Error and Server Logs Don't Rotate

  • Hi All,

    I'm attempting to rotate the server and error logs on my instance of SQL Server 2005. First I tried DBCC ERRORLOG, which ran successfully (no errors kicked back). Neither of the logs seemed to rotate. Second I tried, exec sp_cycle_errorlog, which also ran successfully (again, no errors kicked back). Again, neither of the logs seemed to rotate.

    Am I missing something on this? I opened the server log again and it indeed contains entries from days ago. Any help is greatly appreciated.

  • Have you looked at the logs to see if there is any error or information in there?

  • How are you determining that the error logs are not rotating? Issue that command does not create new files, it rotates the files so that errorlog.1 is renamed to errorlog.2, errorlog.2 is renamed to errorlog.3, etc...

    The system only keeps x number of error logs - so, just looking at the files does not tell you whether or not the logs have been cycled. You have to review what exists in the log file to see whether or not they have cycled.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Hi Jeffrey

    I opened the log via SSMS and saw entries in the current one from before I ran the previously mentioned commands. I did rerun 'exec sp_cycle_errorlog' to watch the numbers rotate as you mentioned and I did see them change now. I then opened up the current log in SSMS and it had indeed been rotated. That was very strange. Also, is there a way to increase the value of 'x'? For instance, between error logs and server logs, I have a total of 10.

    Thanks!

  • In SSMS - right click on the Error Log folder and select configure. You can configure the number of SQL Server error logs that will be kept.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Great, thanks Jeffrey.

Viewing 6 posts - 1 through 5 (of 5 total)

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