SQL Error Log - number of files

  • Hi All,

    I need some assistance in understanding why my SQL error logs are not being deleted.

    I initially thought, the Error Log configuration was incorrect, but upon checking, it is set to Maximum 16 files (see below) which is what I wanted. I also setup an "sp_cycle_Errorlog" which created a new file, but history is still there.

    SQL Error Log

    However, my log files are not deleting. Below is only 28 but as mentioned there is a lot more.

    SQL Error Log_2

    I know I can physically go in an delete the old error logs which will solve the immediate problem, but I would first like to try and understand why it hasn't worked at this point in time.

    My assumption is, since there are so many logs, it cannot delete as of now and needs a manual cleanup first.

    Any idea/help would be appreciated.

     

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Unless you re-start, it's not going to clear the old files up.

    And honestly, I'm not sure I have ever set this. I have sp_cycle_Errorlog set up in a SQL job.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Michael L John wrote:

    Unless you re-start, it's not going to clear the old files up.

    And honestly, I'm not sure I have ever set this. I have sp_cycle_Errorlog set up in a SQL job.

    Restarts are frequent as we do SQL patching  & Windows Patching.

    I'll do a 1 off delete, and then setup sp_cycle_errorlog to see if it resolves, this should confirm my assumption that there are 2 many error logs to clean up.

  • FYI ,After manually clearing the physical Log files on the server, the cycle log appears to now work.

     

     

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

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