Can I move the older ERRORLOG files?

  • Hi all,

    Long story short, we had a process that was filling up our log file at an impressive rate (impressive in a bad way). We got everything under control and that particular error log file is no longer the "current" one. However, it's taking up quite a bit of space on one of our drives. So, I'd like to move it to another drive to free up some extra room.

    I know I can cycle the log files until the log file in question just gets auto-deleted, but I'd like to keep it around a bit longer so we can look through it and troubleshoot.

    Can I manually move the files (such as ERRORLOG.2, ERRORLOG.3, etc)? Is there a super secret sp for doing this? How does SSMS like having those files manually moved without its consent?

    Thanks!

  • You can rename or move the errorlog.n files pretty much as you please. As far as SQL Server is concerned, the current errorlog file is important. The rest are for the DBA. It just happens that SQL automatically manages these files but if one of them doesn't exist, it won't cause a problem.

    As SSMS, it simply shows you the log files that currently exist. If one of them "disappears", the it is simply not shown in the list of available log files.

  • sickpup (4/1/2013)


    Hi all,

    Long story short, we had a process that was filling up our log file at an impressive rate (impressive in a bad way). We got everything under control and that particular error log file is no longer the "current" one. However, it's taking up quite a bit of space on one of our drives. So, I'd like to move it to another drive to free up some extra room.

    I know I can cycle the log files until the log file in question just gets auto-deleted, but I'd like to keep it around a bit longer so we can look through it and troubleshoot.

    Can I manually move the files (such as ERRORLOG.2, ERRORLOG.3, etc)? Is there a super secret sp for doing this? How does SSMS like having those files manually moved without its consent?

    Thanks!

    Since we are discussing this, you can execute sp_cycle_errorlog in the query analyzer to create a new error log file at any point in time and delete/ move the previous error log files.

    - Babu

  • Thanks for the fast responses, guys.

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

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