Does anyone have a good script to shrink a SQL 2005 database to a size (or % free space) that you set?
I now there is DBCC Shrinkdatabase. That is not shrinking the size down.
Thanks
Gary
Printable View
Does anyone have a good script to shrink a SQL 2005 database to a size (or % free space) that you set?
I now there is DBCC Shrinkdatabase. That is not shrinking the size down.
Thanks
Gary
How about the Management Studio?
I need to do this in code. We are mograting some systems and pulling some data from one db to another (al scripted) and I want to include a script to shrink the databases on completion of restore and conversion/migration.
Found the answer and script in is this thread:
http://www.vbforums.com/showthread.php?t=554905