StrataFrame Forum

Maintenance Plan Wizard question...

http://forum.strataframe.net/Topic8917.aspx

By StarkMike - 5/21/2007

Does anybody have any advice/links for information on how to setup a maintenance plan for database(s) in SQL Server 2005?



Specifically, in the maintenance plan wizard.. Do I need to run the task labeled 'Check database integrity'? If and when do I need to run the shrink database task? etc.



I've found articles explaining what they are and what they do but not so many telling me yes I need to run it or no i dont. ;-)
By Trent L. Taylor - 5/21/2007

It is extremely important that you do three things when maintaining your database.  You need to backup, shrink, and flush the logs.  An exampe of this is one of our databases that we had missed to flush the logs.  The database was 800MB and the log file was 25 GB.  After we backed up and added the TRUNCATE LOG the log file wen to 1.5 MB.  So it is very important to do this.  Your database will also expand with deleted records, so it is good to SHRINK the database relatively often to prevent bloating.  And backup is an obvious one, but be sure to add the SHRINK and TRUNCATE LOG to your backups.
By StarkMike - 5/21/2007

WOW! 25GB! Thanks Trent.
By Trent L. Taylor - 5/21/2007

Yup...TRUNCATE LOG is your friend Smile