The default SQL Server log directory is full on my C drive. How does one move the SQL Server error log default directory?
In SQL Server, you can move system and user databases by specifying the new file location in the FILENAME clause of the ALTER DATABASE statement. Data, log, and full-text catalog files can be moved in this way. This may be useful in the following situations: Failure recovery.
By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL. n \MSSQL\LOG\ERRORLOG and ERRORLOG. n files.
Use the SQL Configuration Manager
.
Here are the steps to change the startup to use a different directory. Once done restart server:
In SSMS
go to server properties and look for start up parameters. Right-click in object explorer, properties, then advanced
.
The path is the "e" switch. Change and restart.
It can't be set in documented SQL commands :-)
Basically, it's in the registry as one of the parameters to the sqlservr.exe binary when run as a windows service
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With