Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Can I move the older ERRORLOG files? Expand / Collapse
Author
Message
Posted Monday, April 1, 2013 8:22 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, November 13, 2014 11:18 AM
Points: 34, Visits: 256
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!
Post #1437678
Posted Monday, April 1, 2013 9:11 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, December 4, 2014 7:54 PM
Points: 3,087, Visits: 2,686
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.



Post #1437680
Posted Tuesday, April 2, 2013 3:37 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 9:11 PM
Points: 1,302, Visits: 1,146
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
Post #1437772
Posted Tuesday, April 2, 2013 7:07 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, November 13, 2014 11:18 AM
Points: 34, Visits: 256
Thanks for the fast responses, guys.
Post #1437872
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse