Hi,
I am implementing manual log shipping between a production server and a
standby server.
I have done the follwing:
1. On prod server created 2 devices for db and log.
2. created 2 jobs which will backup db/log,move to network share and restore
to standby server using something like this
BACKUP LOG newnorthwind TO backup_log WITH INIT, NO_TRUNCATE
WAITFOR DELAY '00:00:05'
3. my problem is that when scheduling the log every 15 mins the log will
still have the same file name and even i tried having datetime stamp but the
backup time may differ from one log to other and the restore has to have som
e
kind of dynamic settings that will find the last log backup time.
Can anyone suggest as how i am do that and i dont want to erase the log file
.
Mnay thanks
AnupKeep a table that keeps track of which log files you've already "Shipped"
Greg Jackson
PDX, Oregon|||But How do i get that info when I am restoring the logs to the standby table
"pdxJaxon" wrote:
> Keep a table that keeps track of which log files you've already "Shipped"
>
> Greg Jackson
> PDX, Oregon
>
>|||you name the t-logs with a datetime in the name
DBNAME_TLOG_200506080800.trn
have a process that copies all the trn logs over to the target server
on the target server read al files in the directory and put them in a temp
table sorted by name
this table is (LogsToApply)
walk the records one at a time and apply them in order IF THEY are not
already listed in the LogsApplied Table.
once you've applied a log, add it's name to the LogsApplied table.
that's it.
I could probably dig the script up for you, but it's been over 2 years since
I did this.
It works great.
GAJ
No comments:
Post a Comment