Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring 1 db to another db with a different name

Status
Not open for further replies.

Kalpesh69

Programmer
Mar 18, 2003
3
GB
Hello, i'm new to SQL, but have been pushed into the deep end by actually doing what I was practicing last week.

I have backed up a database, and want to restore that database to another i created with a different name.

For example, i backed up a db called AAA. I backed up this db. I created another (empty) db called AAA_1 and want to restore AAA to AAA_1.

I am concerned I may overwrite AAA, as this db has some important data in it.

Does anyone know how I can go about restoring this??

Much appreciated
 
The Restore topic in SQL BOL contains an example of the SQL code required to restore a databse to a new database with a different name.


You can easily restore to a new database from Enterprise Manager. Right-click the orginal database. Select All Tasks | Restore Database. Type the new database name in the field Restore as Database. Click on the options tab to verify the datbase will be restored to the correct file names. Select Force Restore Over Existing Database. Then click OK to start the restore.

Note: You don't need to crete a database before restoring. Restore will cause the database to be created.

If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top