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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

752 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