How to move SQL error logs (ERRORLOG) to a different drive
If you install SQL Server on your C: drive, you might notice after a while a that the ERRORLOG files begin filling it up. It’s easy to move these off to another drive. Just go to SQL Server Configuration Manger and under “SQL Server 2005 Services”, right click on “SQL Server” in the right pane and click Properties. Click on the Advanced Tab and scroll down to the “Startup Paramters section”.
Now be very careful here. Click the little down arrow and select all the text you see. Copy and paste it into Notepad so you can edit it easily. It should look something like this:
-dc:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmaster.mdf;-ec:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGERRORLOG;-lc:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmastlog.ldf
Edit the path for ERRORLOG to the new drive and folder. The path must already be created so make sure you create this first. Now paste your new paramaters back into the properties window and hit OK. Once you make the change, restart the service and immediately all new ERRORLOGs will be written at the new path. Here is an example of moving the logs off to the E: drive in a folder called “SQL error logs”:
-dC:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmaster.mdf;-eE:SQL error logsERRORLOG;-lC:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmastlog.ldf
