Database Size

Last Post 16 Apr 2013 06:32 AM by skyline212. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
sql-tips
New Member
New Member

--
09 Feb 2013 08:49 AM
Our prod is up to 2 TB and need to reduce some size. We are deleting some table's data. What are the best ways to reduce size from database side like defrag, rebuild indexes and shrink etc.. what are the disadvantages running dbcc shrinkdatabase?
rm
New Member
New Member

--
10 Feb 2013 08:41 AM
Only way is run 'dbcc shrinkfile' after rebuild clustered index.
gunneyk
New Member
New Member

--
13 Feb 2013 06:35 AM
The problem is that shrinkfile will fragment any tables or indexes that are near the end of the file since that is where it shrinks from. So I would shrink it first if you must and then do a REINDEX but make sure you don't shrink it too much so that you don't have neough space to rebuild the index without it growing again.
But why srink it anyway? Free space in the db is not a problem, it's actually a good thing. Sure you may be deleting some data but won't you just add more again later? So why not keep the size as is?
skyline212
New Member
New Member

--
16 Apr 2013 06:32 AM
Go through the links which is describing SQL SERVER – Shrinking Database is Bad – Increases Fragmentation – Reduces Performance

http://www.mssqltips.com/sqlservert...ata-files/

http://blog.sqlauthority.com/2011/0...rformance/

You can improve your performance by using some other utilities as well


Acceptable Use Policy
---