Reputation: 45
Log shipped has been working. I get the message:
Error: The log in this backup set begins at LSN 193489000090302900001, which is too recent to apply to the database. An earlier log backup that includes LSN 192973000046320700001 can be restored.
I checked using Restore HEADERONLY
and found the file that LSN is in and performed:
RESTORE LOG MicrosoftDynamicsAX
FROM DISK = N'F:\RLASQL07\MicrosoftDynamicsAX\MicrosoftDynamicsAX_20170813161501.trn' WITH NORECOVERY;
This restored fine but when I rerun the LSRESTORE
and it fails. What am I missing?
Upvotes: 0
Views: 4491
Reputation: 16
This article may be of some use.
At this time, to check if there are a gaps in the Restore Process. You can run the query below to try to find out whether a redundant Backup Log was performed :
SELECT
s.database_name,s.backup_finish_date,y.physical_device_name
FROM
msdb..backupset AS s INNER JOIN
msdb..backupfile AS f ON f.backup_set_id = s.backup_set_id INNER JOIN
msdb..backupmediaset AS m ON s.media_set_id = m.media_set_id INNER JOIN
msdb..backupmediafamily AS y ON m.media_set_id = y.media_set_id
WHERE
(s.database_name = 'databaseNamePrimaryServer')
ORDER BY
s.backup_finish_date DESC;
Upvotes: 0