x

restore sql 2012 database get stuck

Hi expert, I have a issue when I restore database on sql server 2012 sometime. There is a database in server, I want to copy this database to same server by different name use SSMS GUI to do so. For Example: AdventureWorks2012 -> AdventureWorks2016. I changed destination database name and data file name. When I hit ok button to run, it restored new database but original database restoring and get stuck. I need use backup to replace the original database. I am not sure how it happen. Did anyone see same issue? Thanks.

more ▼

asked Feb 16 at 04:41 PM in Default

avatar image

SSGC
198 13 18 25

Can you clarify a little? You are able to successfully restore the backup to the new database name (and renaming the logical data/log files) and the original database goes into a restoring state?

Feb 16 at 09:00 PM JohnM

Hi John, you are right. New database restored fine. But original database start restoring and never finished. It is happen on our production server SQL 2012 only.

Feb 16 at 10:06 PM SSGC

I'm curious to know why the original database even entered into a restoring state. Were you trying to restore to that database? If you are just attempting to restore the backup to another database and changed the DB name and logical files, the original database shouldn't be touched.

Feb 17 at 12:36 PM JohnM

John, right, i am not sure why it happen. If I forgot to change destination database name, it will restore original database. If I changed destination database name and forgot to change logical data/log files name, it will give me the error message. But SSMS restore GUI didn't give any message and start new database and original database restoring.

Feb 17 at 03:30 PM SSGC

Can you post a screen shot of the GUI? Or even put in all of the variables/values that you did and then just script it out and post that.

Feb 17 at 05:34 PM JohnM
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

use this RESTORE DATABASE NameofDatabase WITH RECOVERY

more ▼

answered Feb 17 at 04:55 AM

avatar image

jason_clark03
415 3 7

use code to restore database looks safe, i just wonder how the issue happen.

Feb 17 at 03:31 PM SSGC
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x244
x156
x129
x3

asked: Feb 16 at 04:41 PM

Seen: 53 times

Last Updated: Feb 17 at 05:34 PM

Copyright 2016 Redgate Software. Privacy Policy