Best practice to keep the error log file size

  • Hi,

    We have SQL Server 2005 EE with SP3 and log shipping has been configured and the backup, copy, & restore jobs runs every 15 mins and because of this backup information writing into the error log, it's size increasing rapidly and If I try to open the error log it taking time.

    I know that we can enable the trace flag to suppress this backup information and not to write in error log. But I want that information to write in error log. And looking for best practices to keep the error log size & if that size reaches, then recycle the error log and create a new one.

    Please advice..

  • Create a SQL Job that will cycle the error log on a regular basis. I typically recommend once a week, but you would need to see what gives you a reasonable size file to work with.

    The command is: EXEC sp_cycle_errorlog

    You can configure SQL to retain more than 6 log files if you want your log history to go back more than 6 cycles as the log is also cycled on a SQL restart.

    Leo

    Striving to provide a better service.

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply