HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Database restore without deleting old database

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
withoutdeletingdatabaseoldrestore

Problem

I've done a copy of my database, using SQL Server 2008 R2 (DB -> Tasks -> Back Up).

Now I'm trying to restore it (DB -> Tasks -> Restore DataBase).

But SQL Studio give me an error and say, that I need to delete old DB to do it.
How to restore it without deleting?

Solution

I'm assuming you want a second copy of your DB, but with another name... since you want to "restore it without deleting"? You can definitely do this.

  • Instead of selecting your current DB, right click on the "Database" item in the object explorer window



  • In the context popup window select "Restore Database...".



  • In the window that pops up, enter in a 'To Database' name for your copied DB, i.e. the new name for the DB copy. So if your original was TradeWind, call this one TradeWindCopy for example.



  • Make sure the 'From database' radio button is selected, and in the dropdown select the backup you just made (tick the required check box). You could also restore 'from device' if you wanted - in that case you need to select a ".bak" file to restore from.



  • Click the OK button and your DB backup is now restored as the new DB with the name you set in step 3.



Good luck.

Context

StackExchange Database Administrators Q#57457, answer score: 4

Revisions (0)

No revisions yet.