29 March 2011

HOW TO SHRINK DATA BASE IN SQL 2000 SERVER

The script file shrinkdb.txt is for shrinking all the databases on a server.



Please do the following steps:
1) Log off all the client applications.
2) Backup all the databases in the server
3) Isolate the server (no sql connection should exist)
4) If SQL version is SQL2000 and above open the shrinkdb.txt file in query analyser and execute it. 
5) Wait till the query completes its execution as it may take several minutes.
Note: Before and after shrinking, compare the size of the log and data files to observe the space recovered.
DOWNLOAD

No comments: