Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

I need to point log files from SQL 2008 r2 to the E drive

I just installed SQL server 2008 r2 enterprise on a Windows 2008 server and during the install I installed everything to point to the D drive, but now my boss wants the logs to go to the E drive. Is there a convientent way to point the logs to the E and leave the data files on the D drive?
0
Thor2923
Asked:
Thor2923
  • 2
1 Solution
 
knightEknightCommented:
detach the database, move the log file  (.ldf)  to the E: drive, and re-attach.  It will then prompt you for the location of the log file.
0
 
knightEknightCommented:
(right-click on the database, select Tasks / Detach)
0
 
MrNeticCommented:
The best way is writen here http://msdn.microsoft.com/en-us/library/bb522469.aspx .
To sum up, what you will do is set datase offline, then copy the file to the other location, rename the original filename(just to ensure that if you fail a command, the db doesn't try to grab this file), run the alter database modify file, set database online :)
0
 
Anthony PerkinsCommented:
Exactly there is simply no need any longer to detach/attach a database in order to move the data files.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now