Coping the Data base

  • I am trying to copy the entire database from one server to another including the system databases. I am trying to create a clone database for test purposes so I need everything exact. The only problem is that my drive letters are not the same. Does anyone have any ideas?

  • Check the restore database command with 'move' option and sp_attach_db in BOL.

    Edited by - allen_cui on 08/08/2003 9:59:21 PM

  • You can use the WITH MOVE option when restoring user databases onto the clone, directing database data and log files to new paths.

    I'm sure about whether you can do so with MASTER though, although a quick glance through BOL doesn't forbid it. Unfortunately I'm not in a position to test MASTER. So, if you try it, let me know how you go. You may need the REPLACE option too.

    Cheers,

    - Mark


    Cheers,
    - Mark

  • Are you coping the database by backing up and restoring?

    If so make a note of the destination database file paths, select Restore Database from the menu and when the dialog box opens switch to the options tab. Select 'Force restore over existing database' and change the 'Restore As' column for the data and log files to those used by your destination database and OK.

  • Why don't you just detach the database, copy the files across and then attach in the previous and new locations ?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply