Compact SQL Server using DBCC ShrinkDatabase question

Posted on 2009-03-30
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!
Question by:badrhino
  • 2
  • 2
LVL 31

Accepted Solution

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

Author Comment

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?
LVL 31

Assisted Solution

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

Author Comment

ID: 24039925

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

746 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

13 Experts available now in Live!

Get 1:1 Help Now