Connect with us

Hi, what are you looking for?

SQL Express

How to move Microsoft 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 Parameters 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 Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf;-ec:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG;-lc:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

Advertisement. Scroll to continue reading.

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 Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf;-eE:\SQL error logs\ERRORLOG;-lC:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
 

Advertisement. Scroll to continue reading.
1 Comment

1 Comment

  1. Stephen

    October 5, 2014 at 1:07 AM

    “restart the service and immediately all new ERRORLOGs will be written at the new path. ” Can you please specify which service exactly?

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Apache

Today I would like to go over proper URL redirection when using SSL but first I would like to preface this by describing what...

Exchange 2003

A useful Exchange 2003 guide I wrote for a friend’s blog originally but I am posting it here on mine now for your viewing...

Citrix Workspace

You can use FIDO2 hardware security keys plugged into your physical desktop over the Citrix HDX remoting protocol for use with virtualized Windows Desktop...

Cloud Design Architecture

The community-driven paperback book initiated by my friends Bas van Kaam and Christiaan Brinkhoff is available for sale on Amazon. If you haven’t picked...

Advertisement

JasonSamuel.com was launched in 2008 as a platform to give back to the IT community by sharing knowledge and expertise. Over the years, it has become a trusted global resource for the latest insights, how-to guides, and forward-thinking leadership on enterprise mobility, security, virtualization, cloud architecture, automation, and other cutting-edge technologies. Today, it serves as a go-to reference hub for IT professionals, attracting hundreds of thousands of unique visitors from around the world each month. Learn more on the About Me page.
Copyright © 2008-2025 JasonSamuel.com