Solved

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

Posted on 2011-09-27
4
299 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

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now