备份中的日志传送 LSN 太新无法应用

Log Shipping LSN in backup too recent to apply

日志传送一直有效。我收到消息:

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.

我使用 Restore HEADERONLY 检查并找到了 LSN 所在的文件并执行了:

RESTORE LOG MicrosoftDynamicsAX 
FROM DISK = N'F:\RLASQL07\MicrosoftDynamicsAX\MicrosoftDynamicsAX_20170813161501.trn' WITH NORECOVERY;

这恢复正常,但是当我重新运行 LSRESTORE 时它失败了。我错过了什么?

这篇文章可能会有一些用处。

https://blogs.technet.microsoft.com/mdegre/2009/08/08/logshipping-secondary-server-is-out-of-sync-and-lsrestore-job-failing/

此时要检查Restore Process是否有漏洞。您可以运行下面的查询来尝试找出是否执行了冗余备份日志:

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;