By default Sql Server ErrorLog files are located in the same drive/path which is used/selected during Sql Server Installation. You may like to store Sql Server Error log files in a drive or path which is other than the one used for Sql Server installation, to avoid filling up of that particular drive. To change the Sql Server ErrorLog files location you may like to follow the following steps:
[ALSO READ] How to find the location of the Sql Server Error Log File
STEP I: Open the Sql Server Configuration Manager
Go to Sql Server Configuration Manager as shown in the below image:
Alternatively, you can go to the Sql Server Configuration Manager exe location as listed in the below table and then double click on it.
STEP II: Change the Sql Server Error Log Path
Once the Sql Server Configuration Manager is opened, then follow the Steps in the Sequence as listed in the below image to change the Sql Server Error logs Path.
Below is the description of each of the sequence of steps which we need to follow in the Sql Server Configuration manager to change the Sql Server Error Log files location.
- Select the Sql Server Services in the left pane of the Sql Server Configuration Manager
- In the right pane right click on the Sql Server Instance Service and in the context menu click on the Properties option.
- In the properties window, select the Startup Parameters tab
- Then in the Existing parameters list, select the entry which is pre-fixed with -e in my instance this entry is as below:
-eC:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Log\ERRORLOG
The path after the prefix character -e is the current error logs path.
Below image explains parts of the Sql Servers error log Startup Parameter:
- Change the path to the desired location. In this case I am changing the current Error Logs location to -eD:\SqlLog\Errors\ERRORLOG. And then click the update button to update the error logs location.
- Then click Apply
- And finally click Ok
Step III: Re-Start the Sql Server Service
Now the changes to the error logs location are saved but they are not still-in effect. If you want these changes to take effect, you need to restart the Sql Server Service.
Note: Any mistake in this startup parameter path will result in failure to start Sql Service once service or the server restarts. And you will come to know about this issue only after making this change and after restarting the Service. Please make sure you are taking into consideration the following points while changing the Sql Server Error Log location.
Make sure that you are not removing the prefix –e
There shouldn’t be any space between the prefix –e and the following path
Make sure that the new folder location which you are specifying should already exists.
Make sure that you are not changing the current error log file path (i.e. ERRORLOG)
1 thought on “How to change Sql Server ErrorLog files location”