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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 resize database file
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

35 Posts

Posted - 01/23/2012 :  12:55:51  Show Profile  Reply with Quote
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?


Starting Member

44 Posts

Posted - 01/23/2012 :  13:23:39  Show Profile  Reply with Quote

Sr Sql server DBA/Artitech

Edited by - biswajitdas on 01/23/2012 13:34:18
Go to Top of Page

Transact Charlie
Flowing Fount of Yak Knowledge

United Kingdom
3451 Posts

Posted - 01/23/2012 :  14:20:36  Show Profile  Visit Transact Charlie's Homepage  Reply with Quote
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.

Msg 3903, Level 16, State 1, Line 1736

Edited by - Transact Charlie on 01/23/2012 14:21:21
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000