Results 1 to 6 of 6

Thread: Moving the location of by datafiles from one drive to another

  1. #1
    Join Date
    Jan 2007
    Posts
    36

    Moving the location of by datafiles from one drive to another

    Hey guys i want to relocate my database datafile and transaction logs from C: drive to D:

    From what i have in mind , correct me if i am wrong: First I will create the same folder on D drive as they are on C drive then copy the datafile from C to D , then come back and change the paths on the database files to point on D.

  2. #2
    Join Date
    Dec 2004
    Posts
    502
    You don't have to create the same folder. You can detach the database files, copy or move them to the new location, and then reattach them. You can also backup the database, restore the database with a new name and pointing the database files to the new location, and then do a rename on the databases. Books Online should give you info on how to do these things.

  3. #3
    Join Date
    Jan 2007
    Posts
    36
    But you have to take the database offline or make sure it is not in use

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    You have to take the db down since you can't copy db files while it's up.

  5. #5
    Join Date
    Dec 2004
    Posts
    502
    If you use the backup, restore, and rename the databases method, you don't have to take the database down. Of course, you will still have to make sure nothing changes data in the database during that time if you want to make sure you have a clean copy.

  6. #6
    Join Date
    Jan 2007
    Posts
    36
    Nose picker and rmiao i appreciate your help

    Thank you(in Swahili Asante sana)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •