How do I shrink my SQL Server Database?
Posted
by Rory Becker
on Stack Overflow
See other posts from Stack Overflow
or by Rory Becker
Published on 2009-01-13T14:13:04Z
Indexed on
2010/04/10
21:43 UTC
Read the original article
Hit count: 501
I have a Database nearly 1.9Gb Database in size MSDE2000 does not allow DBs that exceed 2.0Gb
I need to shrink this DB (and many like it at various client locations)
I have found and deleted many 100's of 1000's of records which are considered unneeded. these records account for a large percentage of some of the main (largest) tables in the Database. Therefore it's reasonable to assume much space should now be retrievable.
So now I need to shrink the DB to account for the missing records
I execute "DBCC ShrinkDatabase('MyDB')"......No effect.
I have tried the various shrink facilities provided in MSSMS.... Still no effect.
I have backed up the database and restored it... Still no effect. Still 1.9Gb
Why?
Whatever procedure I eventually find needs to be replayable on a client machine with access to nothing other than OSql or similar.
© Stack Overflow or respective owner