• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 655
  • Last Modified:

How to move ldf and mdf

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
ac_davis2002
Asked:
ac_davis2002
2 Solutions
 
k_rasuriCommented:
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
 
chapmandewCommented:
You'll need to detach, move the files, then attach.

http://msdn.microsoft.com/en-us/library/ms187858.aspx
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
ac_davis2002Author Commented:
thanks chaps
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now