Solved

Compact SQL Server using DBCC ShrinkDatabase question

Posted on 2009-03-30
4
507 Views
Last Modified: 2012-06-22
I have a database that has multiple tables with each table having large amounts of data being inserted into it periodically, and very rarely do we ever delete a record in these tables.
This database has grown quite large, andI have noticed that all of my tables have large amounts of reserved and unallocated disk space.  For instance, one table has1.7 gigs of reserved space, 478 mb of data and 1.14 gigs of unallocated space.  
My question is would DBCC ShrinkDataBase (DatabaseName, TruncateOnly) be the best option to shrink the reserved and unallocated disk space?  If not, what would you recomend?  Thanks in advance for your respones!
0
Comment
Question by:badrhino
  • 2
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
RiteshShah earned 500 total points
ID: 24020170
yes, i would prefer to go for dbcc shrink. have a look at following link.

http://www.sqlhub.com/2008/05/sql-server-truncate-transaction-log.html
0
 
LVL 1

Author Comment

by:badrhino
ID: 24020273
Thanks for the response.  I'm planning on running this command tonight in case it takes a lot of resources.  Is this approperiate, or do I not need to worry about the server locking up when running it on a 7.5 gig database?
0
 
LVL 31

Assisted Solution

by:RiteshShah
RiteshShah earned 500 total points
ID: 24025111
it is good if you run it in low traffic time.
0
 
LVL 1

Author Comment

by:badrhino
ID: 24039925
RiteshShah:
Thanks!!!
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now