|
Wrangler
Starting Member
USA
35 Posts |
Posted - 01/23/2012 : 12:55:51
|
I have a database file size is 42GB, space used is 25GB, and free space is 17GB. The file only contains 4 non clustered indexes and is associated with it's own filegroup.
I'm wondering what the best way to reclaim about 10GB of the datafile? I'm thinking about creating a temp datafile with a temp file group and create the indexes there with drop existing then resize the empty file. Then I can reverse the process and move them back. That seems like a lot of work but I'm trying to do it the "right way."
Any other suggestions?
Thanks,
|
|
|
Transact Charlie
Flowing Fount of Yak Knowledge
United Kingdom
3433 Posts |
Posted - 01/23/2012 : 14:20:36
|
I'm sorry but I think the advice in that link is incredibly dangerous and very naive.
If your database has grown to a certain size, it has grown for a reason. Truncating some tables and then screwing with the db by shrinking it (and then, god forbid, deleting the transaction log) is not a good idea(TM). I note, at no point in the list of ill advised actions does it suggest taking a backup until the very end...... The transaction log is NOT a dumb log file. It is critically important for the transactional integrity of your database.
Wrangler. before you f**k about with your database, make sure you have a recoverable backup.
Charlie =============================================================== Msg 3903, Level 16, State 1, Line 1736 The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
Edited by - Transact Charlie on 01/23/2012 14:21:21 |
 |
|