Solved

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

Posted on 2011-09-27
4
336 Views
Last Modified: 2012-05-12
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
Comment
Question by:Thor2923
  • 2
4 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 36712641
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
 
LVL 33

Expert Comment

by:knightEknight
ID: 36712651
(right-click on the database, select Tasks / Detach)
0
 
LVL 5

Accepted Solution

by:
MrNetic earned 500 total points
ID: 36715556
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 36825006
Exactly there is simply no need any longer to detach/attach a database in order to move the data files.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Viewers will learn how the fundamental information of how to create a table.
how to add IIS SMTP to handle application/Scanner relays into office 365.

730 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