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?

sp_deletedatabase.sql

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

sp_droplogin_all.sql

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

sp_dbremove_all.sql

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

sp_compare.sql

5) How to create a device file?

sp_createdevice.sql

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.

SP_LOCK1.SQL

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

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