Solved

How to move ldf and mdf

Posted on 2008-10-27
4
645 Views
Last Modified: 2012-06-27
Hi

I have a created a databse but put the ldf and mdf on the wrong server drive (created them on C: but needs to be E:)

can anyone give me the commands to move them please? By the way I'm using SQL2000
Cheers
0
Comment
Question by:ac_davis2002
4 Comments
 
LVL 8

Assisted Solution

by:k_rasuri
k_rasuri earned 250 total points
ID: 22814694
This article is a straight answer
http://support.microsoft.com/kb/224071

first detach the database
Move the files
Attach the files from the new location
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 250 total points
ID: 22814693
You'll need to detach, move the files, then attach.

http://msdn.microsoft.com/en-us/library/ms187858.aspx
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22815426
just my 2 cents:
the detach: attach is usually the fastest method.
I do prefer the backup/restore methods though, having an implicit backup that way :)
0
 

Author Closing Comment

by:ac_davis2002
ID: 31510410
thanks chaps
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

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

14 Experts available now in Live!

Get 1:1 Help Now