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

Restore Help Needed Expand / Collapse
Author
Message
Posted Monday, September 16, 2013 2:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:02 AM
Points: 9, Visits: 104
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.
Post #1495270
Posted Monday, September 16, 2013 3:15 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 2:53 PM
Points: 10,277, Visits: 13,257
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:


  • Get a full backup and all log backups for a day once a day

  • Get a full backup once a day and log backups every 30 minutes



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

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

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
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #1495297
Posted Monday, September 16, 2013 5:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:02 AM
Points: 9, Visits: 104
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.
Post #1495325
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse