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

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Defragmentation~ReIndex~Shrink

Author  Topic 

pdset
Constraint Violating Yak Guru

310 Posts

Posted - 2010-10-18 : 19:27:32

As a result of the Defragmentation, The LDF and MDF has grown in its size.

Once completing the Defragmentation on the database, Is it correct practise, to Shrink them ?

OR

Once completing the Defragmentation on the database, Reindex the database and then Shrink.

This is needed since the MDF and LDF file sizes have grown as a result of Defragmentation.

Please Advise the best practise and many thanks to all of those participated.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-18 : 20:17:33
Do NOT shrink the database after defragmenting it. You will only cause more fragmentation.

It is NOT a best practice to shrink a database, doesn't matter if you've reindexed or not.

Never shrink on a regular schedule. It should only ever be done manually and only if you know you don't need the space again (such as due to a large delete).

Do NOT shrink!

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-10-18 : 22:01:27
[url]http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/[/url]

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -