Options

Log Shipping re-syncing databases

mrbillomrbillo Posts: 2 Bronze 1
edited February 17, 2010 2:11PM in SQL Backup Previous Versions
I use scripts to run the log shipping. I backup the logs every 2 hours. Sometimes a database becomes out of sync where the log won't restore so I do a full backup and a log backup then I restore the full and the log. The full restore succeeds but the log fails. I get an error like:
2/15/2010 7:02:29 AM: SQL error 3013: SQL error 3013: RESTORE LOG is terminating abnormally.
2/15/2010 7:02:29 AM: SQL error 4305: SQL error 4305: The log in this backup set begins at LSN 419000000086600001, which is too recent to apply to the database. An earlier log backup that includes LSN 419000000086100001 can be restored.
I can't figure out what I'm missing, I though a full back and restore would reset the LSNs so the log would restore.
sequence:
full backup and copy to target sever
log backup and copy to target server

full restore on target
restore logs
Bill

Comments

  • Options
    It seems to me the problem here is that you have a transaction log backup job set up outside of log shipping.

    When a log backup is taken (which is essentially what is happening within log shipping) the log is assigned an LSN. These are then restored in order on the target DB, giving you a replica of the source.

    If you take a log backup out of the log shipping job on the source, the subsequent log restore on the target will fail, as there will be a log missing.

    I would advise you to take full backups / differential backups outside of the log shipping jobs rather than transaction log backups every hour along with the log shipping job.

    Hope this helps!
Sign In or Register to comment.