The log scan number (620023:3702:1) passed to log scan in database 'xxxx' is not valid

来源:https://www.cnblogs.com/kerrycode/archive/2018/08/14/9473009.html
-Advertisement-
Play Games

昨天一臺SQL Server 2008R2的資料庫在凌晨5點多拋出下麵告警信息: The log scan number (620023:3702:1) passed to log scan in database 'xxxx' is not valid. This error may indica... ...


昨天一臺SQL Server 2008R2的資料庫在凌晨5點多拋出下麵告警信息:

 

 The log scan number (620023:3702:1) passed to log scan in database 'xxxx' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

 

 

   乍一看,還以為資料庫損壞了(data corruption),但是在做完DBCC CHECKDB後,發現其實資料庫其實是完好無損的。那麼肯定是跟Replication有關。但是在搜索了相關資料,僅僅在The process could not execute ‘sp_repldone/sp_replcounters” 這篇博客中找到了類似錯誤的資料:

 

Common Causes

 

  • The last LSN in Transaction Log is less than what the LSN Log Reader is trying to find. An old backup may have been restored on top of Published Database. After the restore, the new Transaction Log doesn't contain the data now distributor & subscriber(s) have.
  • Database corruption.

 

How to fix this

 

  • Ensure database consistency by running DBCC CHECKDB on the database. 
  • If an old backup was restored on top of published database then use sp_replrestart
  • If going back to the most recent transaction log backup is not an option then execute sp_replrestart  on publisher in published database. This stored procedure is used when the highest log sequence number (LSN) value at the Distributor does match the highest LSN value at the Publisher.
  • This stored procedure will insert compensating LSNs (No Operation) in the publisher database log file till one the compensating LSN becomes more than the highest distributed LSN in distribution database for this published database. After this it inserts this new high LSN in the msrepl_transactions table in the distribution database and executes sp_repldone on published database to update the internal structures to mark a new starting point for log reader agent.
  • Ensure that the log reader agent is stopped and there is no incoming transactions on the published database, when this SP is executed.
  • Since transactions may have been lost, we recommend to reinitialize the subscriber(s) and/or recreate publication/subscription(s).  For large databases consider using “Initialize from Backup” as discussed in SQL Book Online.

 

但是在這個案例當中, 資料庫既沒有損壞,也沒有還原過。 只能是Replication出現了錯誤,但是在SQL Server的Replication中又沒有找到相關錯誤信息,本身這個是AWS的DMS自動生成的Replication,很多內部信息不太清楚(例如,是否出現異常),官方也沒有找到很詳細的介紹這個錯誤的相關資料。在此記錄一下。

 

 

 

 

參考資料:

 

https://blogs.msdn.microsoft.com/repltalk/2010/02/19/the-process-could-not-execute-sp_repldonesp_replcounters/


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 1.工程maven依賴包 2.spark載入資料庫中數據 3.spark支持載入多種資料庫,僅需要用戶依賴不同的資料庫驅動包,並且代碼進行微調即可 根據以上java代碼,僅需調整18行,更改驅動載入類即可。 ...
  • 方法1,建立臨時表,利用hive的collect_set 進行去重。 2,方法2, 利用row_number 去重 比如,我有一大堆的表格, 表格內容大多類似,只是有些許差別。 現在的需求是把我要統計所有的表格中,都有哪些欄位,也就是把所有的表格整合成一張大表 則可以利用row_number 進行去 ...
  • 1. Elasticsearch 常用API 1.1.數據輸入與輸出 1.1.1.Elasticsearch 文檔 #在 Elasticsearch 中,術語 文檔 有著特定的含義。它是指最頂層或者根對象, 這個根對象被序列化成 JSON 並存儲到 Elasticsearch 中,指定了唯一 ID。 ...
  • 轉自:http://www.maomao365.com/?p=6567 摘要: 下文講述sql腳本模擬for迴圈的寫法,如下所示: ...
  • 轉自:http://www.maomao365.com/?p=6410 摘要: 下文主要分享從指定字元串或列中獲取數字信息,如下所示: 實驗環境:sql server 2000 ...
  • Flink基本概念 1.The history of Flink? 2.What is Flink? Apache Flink是一個開源的分散式、高性能、高可用、準確的流處理框架,主要由Java代碼實現,支持實時流(stream)處理和批(batch)處理,批數據只是流數據的一個極限的特例。原生支持 ...
  • 前言 MySQL5.7殺手級新特性:GTID原理與實戰 具體過程如下: 1 準備工作,申請阿裡雲RDS 2 配置從實例 (slave) 3 查看是否開啟了binlog,及使用的日誌格式 4 將主實例數據全量同步到從實例 (最好下載RDS控制台的備份數據,不要mysqldump),詳見恢復雲資料庫My ...
  • 在上篇文章《MySQL表結構變更,不可不知的Metadata Lock》中,我們介紹了MDL引入的背景,及基本概念,從“道”的層面知道了什麼是MDL。下麵就從“術”的層面看看如何定位MDL的相關問題。 在MySQL 5.7中,針對MDL,引入了一張新表performance_schema.metad ...
一周排行
    -Advertisement-
    Play Games
  • 前言 本文介紹一款使用 C# 與 WPF 開發的音頻播放器,其界面簡潔大方,操作體驗流暢。該播放器支持多種音頻格式(如 MP4、WMA、OGG、FLAC 等),並具備標記、實時歌詞顯示等功能。 另外,還支持換膚及多語言(中英文)切換。核心音頻處理採用 FFmpeg 組件,獲得了廣泛認可,目前 Git ...
  • OAuth2.0授權驗證-gitee授權碼模式 本文主要介紹如何筆者自己是如何使用gitee提供的OAuth2.0協議完成授權驗證並登錄到自己的系統,完整模式如圖 1、創建應用 打開gitee個人中心->第三方應用->創建應用 創建應用後在我的應用界面,查看已創建應用的Client ID和Clien ...
  • 解決了這個問題:《winForm下,fastReport.net 從.net framework 升級到.net5遇到的錯誤“Operation is not supported on this platform.”》 本文內容轉載自:https://www.fcnsoft.com/Home/Sho ...
  • 國內文章 WPF 從裸 Win 32 的 WM_Pointer 消息獲取觸摸點繪製筆跡 https://www.cnblogs.com/lindexi/p/18390983 本文將告訴大家如何在 WPF 裡面,接收裸 Win 32 的 WM_Pointer 消息,從消息裡面獲取觸摸點信息,使用觸摸點 ...
  • 前言 給大家推薦一個專為新零售快消行業打造了一套高效的進銷存管理系統。 系統不僅具備強大的庫存管理功能,還集成了高性能的輕量級 POS 解決方案,確保頁面載入速度極快,提供良好的用戶體驗。 項目介紹 Dorisoy.POS 是一款基於 .NET 7 和 Angular 4 開發的新零售快消進銷存管理 ...
  • ABP CLI常用的代碼分享 一、確保環境配置正確 安裝.NET CLI: ABP CLI是基於.NET Core或.NET 5/6/7等更高版本構建的,因此首先需要在你的開發環境中安裝.NET CLI。這可以通過訪問Microsoft官網下載並安裝相應版本的.NET SDK來實現。 安裝ABP ...
  • 問題 問題是這樣的:第三方的webapi,需要先調用登陸介面獲取Cookie,訪問其它介面時攜帶Cookie信息。 但使用HttpClient類調用登陸介面,返回的Headers中沒有找到Cookie信息。 分析 首先,使用Postman測試該登陸介面,正常返回Cookie信息,說明是HttpCli ...
  • 國內文章 關於.NET在中國為什麼工資低的分析 https://www.cnblogs.com/thinkingmore/p/18406244 .NET在中國開發者的薪資偏低,主要因市場需求、技術棧選擇和企業文化等因素所致。歷史上,.NET曾因微軟的閉源策略發展受限,儘管後來推出了跨平臺的.NET ...
  • 在WPF開發應用中,動畫不僅可以引起用戶的註意與興趣,而且還使軟體更加便於使用。前面幾篇文章講解了畫筆(Brush),形狀(Shape),幾何圖形(Geometry),變換(Transform)等相關內容,今天繼續講解動畫相關內容和知識點,僅供學習分享使用,如有不足之處,還請指正。 ...
  • 什麼是委托? 委托可以說是把一個方法代入另一個方法執行,相當於指向函數的指針;事件就相當於保存委托的數組; 1.實例化委托的方式: 方式1:通過new創建實例: public delegate void ShowDelegate(); 或者 public delegate string ShowDe ...