Creating a new DB with a backup of another.

  • It's just like it sounds...

    For example I've got a database named "example"... and I create a new DB called "example_duplicate" . I'd like to do a full backup of example, and restore it to example_duplicate but of course get errors. What is the best way to do this? SQL 2005 64 bit, latest service packs.

    Thank you,

    DH

  • When restoring a DB, you must check the restore you want to use. Just selecting the file is not enough. Then if you are restoring to a different DB name or just restoring over the existing DB, you must check the overwrite option. You will also need to check overwrite if you created the new DB before running the restore. If you are restoring to a new DB name, you should verify and/or change the file names and paths. They default to the original values in the backup.

  • I'll give more details so its easier to understand what I'm trying to accomplish. We have two SQL servers running a mirror. In a few weeks we will have a staging SQL server that our developers will be able to use/abuse... but for now what I'd like to do is take a full backup of live databases, then create a new database on the mirror machine.. like above I'd have to call it "example_duplicate" or something like that since the "example" database already exists on that mirror machine in restore/mirror mode... so I have to rename the DB, as well as the files. I just want to make sure I do this correctly.

  • I figured it out, no need to respond 🙂

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

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