Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

log restore to new db name Expand / Collapse
Author
Message
Posted Tuesday, February 19, 2013 4:47 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 8:33 AM
Points: 246, Visits: 791
I have restored a database to a new name. The original name is forms. The new database is forms_scott(Restoring). When I try to restore a log:

RESTORE LOG [forms_scott] FROM DISK = N'D:\sqlbackups\forms\Forms_backup_2013_02_17_130013_8884015.trn' WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 10
GO

I get:

Msg 3154, Level 16, State 4, Line 1
The backup set holds a backup of a database other than the existing 'forms_scott' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.


How can I restore a log to a new db name?



Post #1421889
Posted Wednesday, February 20, 2013 1:33 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 7:22 AM
Points: 1,327, Visits: 4,506
That should work... are you sure the transaction log backup file actually has a backup of the original forms database?

Run a restore of the log with headeronly to verify.

RESTORE HEADERONLY FROM DISK = N'D:\sqlbackups\forms\Forms_backup_2013_02_17_130013_8884015.trn'



Post #1421969
Posted Wednesday, February 20, 2013 6:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 4:11 AM
Points: 51, Visits: 401
Did you restore over an existing database without using the overwrite flag?
Post #1422057
Posted Wednesday, February 20, 2013 8:00 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 8:33 AM
Points: 246, Visits: 791
No, I am trying to restore to a new database name while the existing one stays in place.

I ended up having him restore the database to another server with the original name and then I am restoring the logs. Of course, now he keeps putting it in recovery mode, so I cannot do logs. Hopefully, we'll get where I can restore some logs...

When he did the restore originally, the database had next to it something like "restoring..." instead of the "recovering...". Thus, I Don't think he did the right type of restore.






Post #1422100
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse