Groups | Blog | Home
all groups > sql server programming > march 2005 >

sql server programming : restore logs programatically


Hassan
3/13/2005 10:24:56 PM
As part of log shipping, we have Tlogs being restored every 5 mins and all
the tran files have a datetime appeneded.
I would like to have a script that i can restore all these log files in a
cursory based one after another as opposed to doing it manually by picking
one file at a time. I would like to pick a starting log file and an ending
log file and based upon the filename, it would parse the datetime portion
and work its way,

I have seen this someplace and I just cant find it now


Uri Dimant
3/14/2005 10:02:40 AM
Hassan
You would be better to create a job that restore your LOG files
I think it relates to your previous post , I have some ideas.

Create a job that does BACKUP LOG file ( I assume you have already done FULL
backup database) in the first step an the second step will restore the LOG
file.Obviously you will have to delay a little bit between two steps in
order to the BACKUP operation might take some time as RESTORE operation as
well.




[quoted text, click to view]

AddThis Social Bookmark Button