?
Solved

How do I move SQL Server error log files from the default location?

Posted on 2008-10-06
12
Medium Priority
?
2,829 Views
Last Modified: 2012-05-05
Hello all, I need to move the SQL Server error logs from the default C: to a different partition. Can someone tell me how to do this? I've goofed around with the configuration manager and just can't quite get it to work.
0
Comment
Question by:DanteKingsley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
12 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22652510
you mean, the ERRORLOG file(s)?
you cannot have them on a different location than mssql installation folder\log ...

only possibility is to mount the log folder to a different drive (requires that you stop sql server)
0
 

Author Comment

by:DanteKingsley
ID: 22653004
Hi Angel,

How do I do that? I can stop or start it anytime I want. Yes, ERRORLOG files. They're eating up the C: so I want to move them to a D: partition.

Can you tell me how to do this?
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22653023
Official way:

Go to the SQL Server Configuration Manger Under the SQL Server 2005 Services tab find the SQL Server Service --> Right click --> Properties --> Advanced tab.

Find the Startup Parmaters and change the -e Parameter and change the path. The path must be exist already.

Restart the services.
-----------------------------------------
Unofficial way (only recommended for the truly skilled or the really really brave):
Find the
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\Parameters
registry  key and change the "SQLArg1"="-e....." key.
Rester the services.


-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

Open in new window

0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

Author Comment

by:DanteKingsley
ID: 22653087
lol the truely skilled or brave,

Hi Jimpen,

I've been messing with this and don't see the -e on start up parameters. I have a test server to goof with before I try this on the production box.

Can you give me more advice on this? Do I add -e for the start up parameters?
0
 
LVL 38

Accepted Solution

by:
Jim P. earned 2000 total points
ID: 22653244
Below is the dump of my local reg key.

If you have the -d (master DB file location) and the -l (master's log file) then yes, add the -e parameter. Note that if you do this in the configuration manager that the only spaces are in the path names with none between the dashes and the rest.

>> lol the truely skilled or brave,

And that's the really brave. ;-)

And if doing the log file, while you're in the registry, you can change the default backup location by editing the BackupDirectory value in the HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer  key.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\Parameters]
"SQLArg0"="-dc:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\master.mdf"
"SQLArg1"="-ec:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\LOG\\ERRORLOG"
"SQLArg2"="-lc:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\mastlog.ldf"

Open in new window

0
 

Author Closing Comment

by:DanteKingsley
ID: 31503516
Thank You so much !!!!!!!!!!!!!!!!!!!!!!! It worked !!!!!
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22653442
Glad to be of assistance. May all your days get brighter and brighter.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22653696
I see I failed to remember the "obvious" answer here :(
good work, jimpen!
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22653709
do not fret angel....it is the obvious answers that typically escape me as well.  ;)
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22653948
>> I see I failed to remember the "obvious" answer here :(

Well its either late evening or early morning where you are. You either have had too much Duvel or not enough coffee. ;-)

Been there, done that.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22653981
I do appreciate the Duvel....
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22654062
sorry for the plenty of <offtopic> here ...
it is indeed late, but no Duvel here (at all). only O-juice ... (maybe that's the problem 8-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question