question

MIKE 7 avatar image
MIKE 7 asked

shrink db not working

Hi I created a db then add many tables , insert into them a lot of rows , it reached 70MB

then i deleted all the tables

but when i shrink my db , it did not shrink! it stay 70MB

dbccshrink-database
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kristen avatar image
Kristen answered

Sounds like there are transactions (probably the DELETE's!!) which are still in the transaction log. Run a transaction log backups, and then try the shrink again. If that doesn't work you probably have a "stuck" transaction - stop/starting SQL Server will usually clear that (by forcing a checkpoint on the DB), but if not please come back and ask again.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.