March 23, 2010 at 11:19 am
Hello-I have a 247 GB db with about 92 GB of free space. This is about 37%. I am trying to shrink the DB to get only about 10% and release the space to the OS. I have tried Shrink Database and Shrink File with no luck. Any advise about how to complete this?
Thanks
March 23, 2010 at 1:01 pm
Why do you want to return the space to the OS? Your database is going to grow - so why not keep the space for the future growth of the system?
How are you determining the space available in the database?
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
March 23, 2010 at 1:48 pm
This actually a unique situation. This is an old SharePoint env that we are migrating off of. The DB is one of several content DB where we are actually removing data and not adding data. We are still having to back up the live data so this is why I am trying to shrink the size of the DB.
I have found the sizes a couple of ways. One is by going to Tasks>Shrink>Database. The amount is shown here. I have also run sp_spaceused. I know that the figures are accurate because I just deleted a 62 GB SharePoint site collection.
Thanks.
March 23, 2010 at 1:57 pm
What were the actual commands that you have used?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 23, 2010 at 2:04 pm
If you are migrating off of this system, why do you care? Once you have moved to the new system wouldn't you just retire the existing system and delete the old databases?
FWIW - SQL Server only backs up the portion of the database that is in use. Once you deleted that 62GB's of data, your backups should have shrunk by that same amount.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
March 23, 2010 at 2:07 pm
the main reason: we are out of diskspace on the data volume
March 23, 2010 at 2:13 pm
If you feel that you really need to shrink the database, the script on the link below should do it. Shrinking the database file will result in index fragmentation, so you need to consider doing re-indexing or index defragmentation after you complete the shrink.
As was mentioned before, backup only backs up the used portion of the database, so it will not decrease the size of your backup files.
Shrink DB File by Increment to Target Free Space
March 23, 2010 at 2:16 pm
Thank you for your help.
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply