Solved

How to move ldf and mdf

Posted on 2008-10-27
4
651 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
[X]
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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL State HYT00. Timeout expired proplem 8 44
SQL Server - Multiple Conditions on Left or RIGHT Joins 2 30
SQL: Transformation or Pivot 3 36
TDE for SQL Web Edition 1 42
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…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

752 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