Saturday, February 25, 2012

Copy a database

Hi,

I need to copy a database for example I have ABC I want to create ABC_Test

How to do that?

regards,

PorcupineBackup and restore is often the easiest way. See "Copying Databases",
"BACKUP" and "RESTORE" in Books Online, and also this KB article:

http://support.microsoft.com/kb/314546/EN-US/

Simon|||Here's what you do:

1. Do a backup of your database to a file (or tape). For example -
Production.BAK
2. Do a Restore and select the radio button "FROM DEVICE".
3. Find the Production.BAK file and select it.
4. In the "Restore the Database As" text field, type in the name of
your new database.
5. Click on the Options tab and verify that the "Restore as" directory
actually exits in your machine.

6...good luck.

*Notes: ***IMPORTANT***
Make sure that
1. the "Restore as" text field is not a name of a database that already
exists on that server.
2. the "Restore as" file name is not the same as another .mdf or .ldf
file in the directory. Normally when you fill out the first text box,
the file names get changed automatically.
3. the step number 5 is very important...double check that.

No comments:

Post a Comment