Restore Issue in SQL Server 2012


I have a database ( Testdb1) which I need to create a copy, so I went into management studio and ran the copy database wizard.  The copy db is called (Testdb2) and everything looks good.  Now there has been some new data on testdb1 which I want to add to testdb2, so I ran a full backup on testdb1 and then tried to restore it to testdb2.  in the restore window I selected the testdb1.bak and then pointed it to the testdb2 database.  In the files window I changed the files to testdb2 and In the options window I selected "replace".  I ran the restore, which was successful, but now my original db (testdb1) is in restore mode!  What did I do wrong??  I just wanted testdb1.bak to update testdb2, so I am not sure why testdb1 was affected all.  

Please help!


Who is Participating?
Randy Knight, MCMConnect With a Mentor Principal ConsultantCommented:
This is why I don't use the GUI to execute commands.  Use it to set everything up then hit the "Script" button and validate that the script is doing what you want to do, then execute it.  This will help you learn the SQL commands as well.
DBAduck - Ben MillerPrincipal ConsultantCommented:
Because you needed to specify a new name for the database. In the restore window it presupposes that you want to restore to the same name.

So your restore clobbered your existing testdb1.
When you do restore by default the target database is the one you restore from. It seems that you restored over your original, Testdb1, database.
bjenningsAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.