Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to move ldf and mdf

Posted on 2008-10-27
4
Medium Priority
?
653 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 1000 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 1000 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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 ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

670 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