SQL server Error log in GBs not able to reclycle

  •  

    Hi,

    The SQL server error log has grown to 3 GB. not able to recycle using  SP_cycle_errorlog command.

    Is there any limit on the size of error log file to which this command works to recycle log?

    Any help is appreciated.

    Thx


    Kindest Regards,

    mohammed

  • hmmm .. you might need to stop and restart the sql service, that will create a new error log. I have jobs on my servers which cycle the log every night, you might want to try that.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • try 

    DBCC ERRORLOG 

    Microsoft recommends using this over Sp_Cycle_ErrorLog

    Kindest Regards,

    Sameer Raval [Sql Server DBA]
    Geico Insurance
    RavalSameer@hotmail.com

  • Hi, I am having the same problem recycling my error log.  I have a job to recycle the log every weekend, but there were problems and the log grew to 18 GB!  I have tried everything...sp_cycle_errorlog, dbcc errorlog...nothing works.   New error logs are created, but the 18 GB log is still there.   If I try to delete the log file manually, it tells me that it is still in use.

    Any help would be greatly appreciated.

  • Did you make sure the 18 GB error log file is the oldest one?

    NOTE: Single execution of the stored procedure sp_cycle_errorlog (or sp_cycle_agent_errorlog for SQL Agent Error Logs) will close the current one and delete the oldest one, hence creating room for the new error log.

    sp_cycle_errorlog closes the current error log file and cycles the error log extension numbers just like a server restart.

    Every time SQL Server is started, the current error log is renamed to errorlog.1; errorlog.1 becomes errorlog.2, errorlog.2 becomes errorlog.3, and so on. sp_cycle_errorlog enables you to cycle the error log files without stopping and starting the server.

    Rock & Roll!

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

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