September 16, 2013 at 2:07 pm
Hello,
I am not sure if this has been addressed already. I have been a long time reader but this is my first post. I need assistance with a database restore solution. I recieve a full BAK and the transaction logs 30 minutes from a supplier. I would like to restore the DB and process the TRN files nightly. The database has to be in a mode where I can query and insert the new information into a reporting database after the TRN files have been processed and then repeat the process the next night. It seems no matter what I try I get the "Different Recovery Path" error or I can process everything only for that day. I am running SQL Server 2008 R2 standard and have been banging my head on this one for about a week now.
Any help or pointers would be appreciated.
September 16, 2013 at 3:15 pm
I'm not sure I understand what you need to do. Based on what you have provided you could be doing either of these 2 things:
Then it sounds like you want to be able to read and write to the restored database. Assuming you don't need to keep the changes you are making to the restored database you should be able to do this no problem in the first scenario I mention above. It is just RESTORE full backup WITH NORECOVERY, RESTORE all log backups with NORECOVERY and then run a RESTORE db WITH RECOVERY as the last step. Then the database will be available for read and write. Repeat each day.
In the second scenario above you can't really write to the database. You'd be doing each restore WITH STANDBY so can read from the restored database.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 16, 2013 at 5:44 pm
Thanks for the reply Jack,
I am sorry i wasn't clear. Maybe I can help with this. I have the BAK from from Saturday which is the only one I will have. After that I will be getting TRN files every half hour to keep the file size small. The idea is to process all of the TRN files nightly so our site will be 24 hours behind. So the second scenario is correct except I will not be getting any more BAK files.
When I restore in stand by mode, and attempt to apply the first TRN log I get "The recovery path is different then what is in the log file". If I restore in recover mode I can apply the transactions but I can not read the database due to the status being in recovery. I tried to restore WITH RECOVERY, make a backup of that but that backup will not accept TRN files.
Should the database once restore in standby mode be in a certain recovery mode? Do I need to duplicate the suppliers drive mappings and/or setup? I am really at a loss.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply