Solved

How to move ldf and mdf

Posted on 2008-10-27
4
649 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 143

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

749 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