Thursday, July 05, 2012

Execute a command for a batch in Windows 2008 Server


ForFiles

This is a command in windows 20008 for applying specified command on each file for a batch. 
For example if want to delete files older than a specified time period then this command will help me accomplishing this task. 
This is a very useful and easy to understand command. 
Command for an example is given below : 

The mentioned below command will delete files older than 15 days in the folder "D:\YOURFOLDERNAME" and any sub directories in it. 


forfiles /p d:\yourfoldername /s /m *.txt /c "cmd /c del @file" /d -15


forfiles --command name
/p -- specifies that next argument is path 
/s -- specifies that sub directories should be scanned
/m -- file type or search criteria 
/c -- actual command which will be executed for each file
"cmd /c" and "@file" are default values for the argument /c
"cmd /c  yourcommand @file"
/d --specifies number of days 


Further details can referenced on mentioned below technet link. 

Thanks to TechNet.





Monday, June 11, 2012

Atlantis Schema Inspector - by "Atlantis Interactive"


Another handy tool to compare schema in SQL Server.

SQL Server Schema Comparison and Scripting Tool.

Atlantis Schema Inspector is an incredibly fast, flexible and complete (and free) SQL Server synchronization and SQL Script tool - use it to get your deployments right first time, every time.

Schema Inspector offers an easy and fast way to compare and synchronize schema elements of SQL Server databases whether live, test, snapshots or partial databases. Any changes can be checked speedily and easily without errors. It can save your development team lots of time and help you achieve your project delivery accurately and on time. Schema Inspector works in tandem with our Data Inspector and both combine with our SQL Everywhere to make a uniquely integrated “one stop” solution for all SQL developers and administrators alike.

You can confidently use Schema Inspector and Data Inspector to save hours of development time whether developing new SQL Server databases or migrating old systems over to new. The savings in development time will make a significant contribution to the ensuring your project will deliver solutions to your users on-time and on-budget. SQL Script can be a notoriously difficult way in which to perform SQL Server synchronization - Schema Inspector relieves the difficulties associated with your deployments.

Thanks to Atlantis Interactive UK Ltd.
Download from the link mentioned below : -

Please consider donating them. 

SQL Load Generator by CodePlex

A very handy tool to generate a good load, a must have tool. 

SQL Load Generator is used to run multiple concurrent queries against SQL Server. The user can choose the number of concurrent queries to run, provide different queries, choose SQL or domain accounts, and provide application name settings. SLG was developed using C# 3.5.

Here’s a summary of the features:


Runs multiple queries against SQL Server. You can add as many as you like.
Each query can be either a SQL User or Domain User.
You can specify an Application name for the connection.
You can specify the new of concurrent threads to use for each query.
You can start all queries, stop all queries, remove all queries.
There is logging (you can toggle on and off… it isn’t precisely thread safe, and can cause crashes when there are lots of failures on multiple threads) for failed queries.
You can set all the defaults on a per user basis, and persist them.
Each query has a # of Runs and a # of Fails counter. You can use the ‘Reset Counters’ feature to reset the total counts (not the per query counts).

You can save your settings via the ‘Options’ menu. You can add default items to the different dropdowns, provide default query settings, change the log locations, etc. You can also modify the stock connection string… though keep in mind some of the settings (particularly ‘pooling=false’ will affect the way the application works… namely, the connections to SQL Server won’t be closed). 



Download from the link mentioned below :  




Thanks to Pinal Dev who tweeted this.