How do I move the default log files placed in: C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG to a different location? I want to place them in a partition I have setup which stores log files? Reason being is that this log directory is getting quite large, 600MB and I want to conserve space on my C:\ partition.
Thanks.
You can move the files using sp_detach_db and sp_attach_db. You can find the steps explained in the following article:
How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server
http://support.microsoft.com/kb/224071
-Sue
|||Sue:
Acutally I dont want to move any database files, what I want to move is simply the log files, just errors, activity and such. The files reside in the /log directory not the /data directory.
Thanks for the help.
|||For the SQL error log, open up SQL Server Configuration Manager. Select the SQL Services node, double click on SQL Server in the right pane and go to the advanced tab. View the startup parameters. The path following -e is for the error log. See the books online topic: Using the SQL Server Service Startup Options.
You can use Configuration Manager to change the path for SQL Agent as well. Select the service node, double click on SQL Server agent and go to the advanced tab. Change the path for the dump directory.
In terms of the default trace, that will default to your installation directory. You can create your own trace if you want another location.
-Sue
|||Thanks Sue that did the trick.
Changed dump directory to: E:\MSSQL and startup parameters e to E:\MSSQL\ERRORLOG and restarted the service.
No comments:
Post a Comment