Monthly Archives: August 2013

SQL – Identify & Drop Duplicate Index

This post explains the simple steps to identify a duplicate indexes in all the databases.  The duplicate index are more than one indexes that differ only by it’s name but consist of identical fields internally. It generates overhead when performing updates, inserts … Continue reading

Posted in SQL, T-SQL | Tagged , , , | 4 Comments

SQLCMD – Database Backup and Restore – Automation – Quickest and Simplest method

In today’s world we rely more on third party tools to do a Backup and Restore of databases. Most of us still use SQL Native method to do a Database Backup and Restoration. This post illustrates the quickest way of … Continue reading

Posted in Backup and Restore, Robocopy, SETVAR, SQL, SQLCMD, Uncategorized | Tagged , , , | 7 Comments

PowerShell – Invoke Commands,Batch files & Executable file – Dynamically passing Parameters

I’ve recently got a request to invoke an executable file from Powershell. Different ways of executing a executable file is given below. The advantage is that either you can pass the parameters dynamically by reading it from a text file or using … Continue reading

Posted in PowerShell | Tagged , , | Leave a comment

SQL – One Query to fetch SQL Jobs Details of All SQL Version – 2000/05/08/R2

Single Query to fetch complete details of sql jobs and you can run it across different version of SQL [2000/2005/2008 and R2]. I’ve undergone dynamic query string limitation issue and hence I’m including the workaround details in the same post. … Continue reading

Posted in SQL, T-SQL | Tagged , , , , | 5 Comments

SQL – Find Database File Usage Details – 2000/05/08/R2

This post is to find the database file usage details of all databases of an instance. The query runs on all versions of sql 2000/2005/2008/R2 . The requirement is to use same query to be executed it across all version … Continue reading

Posted in SQL, T-SQL | Tagged , , , , , | Leave a comment