Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 352
  • 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

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

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