Friday, March 23, 2012

How to change error log location

I have been trying to change the location of the SQL 2005 error log. It's logging to the default location at C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG

I want to move the log location to the E drive because it can get quite large.

I already changed the setting in the SQL Server Error and Usage config tool, but this did not seem to make a difference.

Can someone tell me please how to do this?

Thank You,

Ed

I don't believe there is a suported way of doing this.

The SQL Server Error and Usage not for the standard SQL Log, but for the log relating to fatal errors and usage information see "Error and Usage Report Settings" in BOl for more information.

|||YOu can schedule a job to recycle the error log and step2 to move the archive files to another drive where you have more storage.|||

The errorlog location is controlled by the -e startup parameter, which is read from the registry at startup.

You can change the default location from the SQL Server Configuration Manager. Open the properties for the SQL Server Service and find the Startup Parameters entry on the Advanced page.

By default the entry looks something like this:

-dD:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf;-eD:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG;-lD:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

Change the path after -e to be anything you'd like.

No comments:

Post a Comment