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: Thursday, September 11, 2014 8:30 AM
Points: 247, Visits: 797
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, September 17, 2014 9:19 AM
Points: 1,307, Visits: 4,508
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: Tuesday, September 16, 2014 12:34 AM
Points: 51, Visits: 406
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: Thursday, September 11, 2014 8:30 AM
Points: 247, Visits: 797
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