|
ApexSQL Knowledgebase Tips and How-to Articles for Apex SQL Tools What to do with large log files due to index rebuilds DESCRIPTION Index rebuilds can create very large log files. This KB discusses what to do when this happens. SOLUTION 1) Make sure the database has a LOT of empty space in it. As in 1 to 2 YEARS worth of estimated growth if it is an active database, or double current space if it is slowly changing. This will allow the index rebuild/reorg process to lay the data/index pages down in contiguous order - as in not fragmented right off the bat. Trying to defrag a full database is a fruitless excercise! 2) Defrag only stuff that is currently highly fragmented. The standard for this is > 30%. See BOL for a script you can use plug-and-play. I also skip very small tables (< ?? pages in size, where ?? is either 50 or 100 depending on the phase of the moon :) 3) Assuming you have a very fragmented system due to not having sufficient space, open up free space and then CONTROL the first few rebuilds. Split up your tables into different runs so as not to create a huge log at one time. Be sure to backup the tlog between runs to flush committed entries and free space. SEE ALSO Excessive DAT Files AUTHOR TheSQLGuru LAST REVIEW 30 August 2007 Labels: ApexSQL Log, General |
© 2008 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use | Privacy Policy
