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
Solved

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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

840 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