x

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

more ▼

asked Dec 10, 2009 at 04:24 AM in Default

MIKE 7 gravatar image

MIKE 7
1 2 2 2

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Dec 10, 2009 at 05:37 AM

Kristen gravatar image

Kristen ♦
2.2k 6 7 10

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x47
x36

asked: Dec 10, 2009 at 04:24 AM

Seen: 907 times

Last Updated: Dec 10, 2009 at 05:37 AM