2017-09-25 123 views
0

日誌出貨一直在工作。我得到的消息:日誌傳送LSN備份太近不適用

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和失敗。我錯過了什麼?

回答

0

本文可能有些用處。

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

此時,以檢查是否存在在還原過程中一個缺口。您可以運行下面的查詢來試圖找出是否執行冗餘備份日誌:

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; 
+0

Thanks TT。我們通過TSM採取所有備份,很少遇到問題,但我發現有人採用了後門備份,並導致了我的事務日誌流中的差距,所以我將不得不重新創建日誌傳送。 –