Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Alternative to shrinkdatabase?

Author  Topic 

zug
Starting Member

1 Post

Posted - 2010-09-20 : 09:48:15
Hello,
I have a database that was growing wildly due to an application problem. The server is now almost at capacity. We have made changes to the application and deleted the offending columns in the database. The problem is, the database size has not shrunk. I have been reading about 'shrinkdatabase' but almost every post recommends against using it. Is there a better way to achieve what we want? Would it be better to backup and then restore?
Thanks!

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-09-20 : 10:59:16
Backup/restore won't change the database size.

As a once-off operation after deleting a lot of data, there's nothing wrong with shrinking the files (DBCC ShrinkFile). Rebuild all your indexes afterwards to fix the fragmentation that the shrink caused.

It's regular or scheduled shrinks that are a silly idea

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -