Solved

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

Posted on 2011-09-27
4
342 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
[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
  • 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

Industry Leaders: 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 troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

707 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