SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


log restore to new db name


log restore to new db name

Author
Message
Sailor
Sailor
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1074 Visits: 861
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?



Ian Scarlett
Ian Scarlett
SSCertifiable
SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)

Group: General Forum Members
Points: 5406 Visits: 7144
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'



raadee
raadee
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 476
Did you restore over an existing database without using the overwrite flag?
Sailor
Sailor
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1074 Visits: 861
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.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search