Search this site!

These are utility SPs for mostly admin related tasks. I developed these mainly to try some new feature in SQL60/65 or just plain joblessness I should say. Few address some daily admin chores. These scripts do require some modifications like changing the drive letters, path, server names etc. If you have any questions, send an email & I will try to answer it asap.


Click here to download the SQL scripts.

1) How to drop a database using an on-demand task?


2) How to drop a login from all associated databases?


3) How to drop a database & remove all the associated physical files?


4) How to compare two different databases (on same server or different servers) & obtain a list of diffferences?


5) How to create a device file?


6) How to create database using an on-demand task that can be used by all users?

sp_createdatabase (SERVER1) v20.SQL

7) How to generate a report of the locks in a database with table names? The report can be obtained for specific SPIDs.


8) How to count occurrences of a string in all SPs in a database?

This page was last updated on April 28, 2006 05:15 PM.