昨天一台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/

The log scan number (620023:3702:1) passed to log scan in database 'xxxx' is not valid的更多相关文章

  1. mysql oom之后的page 447 log sequence number 292344272 is in the future

    mysql oom之后,重启时发生130517 16:00:10 InnoDB: Error: page 447 log sequence number 292344272InnoDB: is in ...

  2. 14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小

    14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小 改变 InnoDB ...

  3. 14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量

    14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量 改变InnoDB redo ...

  4. InnoDB: The log sequence number in ibdata files does not match

    InnoDB: The log sequence number in ibdata files does not matchInnoDB的:在ibdata文件的日志序列号不匹配 可能ibdata文件损 ...

  5. Thread <number> cannot allocate new log, sequence <number>浅析

    有时候,你会在ORACLE数据库的告警日志中发现"Thread <number> cannot allocate new log, sequence <number> ...

  6. resize2fs: Bad magic number in super-block while trying to open /dev/centos/root Couldn't find valid filesystem superblock

    今天在进行lvm扩容之后,按照惯例进行 resize2fs 操作,发现报如下错误: # resize2fs /dev/centos/root resize2fs 1.42.9 (28-Dec-2013 ...

  7. The transaction log for database 'xxxx' is full due to 'ACTIVE_TRANSACTION'

    今天查看Job的History,发现Job 运行失败,错误信息是:“The transaction log for database 'xxxx' is full due to 'ACTIVE_TRA ...

  8. Error: 9001, Severity: 21, State: 5 The log for database 'xxxx' is not available

    昨天下午5点多收到几封告警邮件,我还没有来得及看,GLE那边的同事就电话过来,说数据库出现告警了.让我赶紧看看,案例具体信息如下所示: 告警邮件内容: DATE/TIME: 2015/1/23 17: ...

  9. MySQL中的重做日志(redo log),回滚日志(undo log),以及二进制日志(binlog)的简单总结

    MySQL中有六种日志文件,分别是:重做日志(redo log).回滚日志(undo log).二进制日志(binlog).错误日志(errorlog).慢查询日志(slow query log).一 ...

随机推荐

  1. Android UI(一)Layout 背景局部Shape圆角设计

    Jeff Lee blog:   http://www.cnblogs.com/Alandre/  (泥沙砖瓦浆木匠),retain the url when reproduced ! Thanks ...

  2. 配置babel

    配置babel ECMAScript的版本,每年都会定期举行会议,发布各种标准,当前版本到了2019,但大部分人使用的浏览器,都可以支持es2015,也就是es6,要等到大部分浏览器都支持到最新版本, ...

  3. 在Mac下连接阿里云服务器

    1.登录 ssh root@IP地址 eg:00.00.00.00 2.新建用户 useradd -d /home/用户名 -m 根目录名 (这条命令,就是创建一个新用户,并给该用户在home目录下创 ...

  4. Python数据科学“冷门”库

    Python是一种神奇的语言.事实上,它是近几年世界上发展最快的编程语言之一,它一次又一次证明了它在开发工作和数据科学立场各行业的实用性.整个Python系统和库是对于世界各地的用户(无论是初学者或者 ...

  5. 机器学习中数据清洗&预处理

    数据预处理是建立机器学习模型的第一步,对最终结果有决定性的作用:如果你的数据集没有完成数据清洗和预处理,那么你的模型很可能也不会有效 第一步,导入数据 进行学习的第一步,我们需要将数据导入程序以进行下 ...

  6. docker常用命令2

    Docker作为一种开源的.优秀的容器化技术,目前受到越来越多公司的运用,下面是我工作中常用到的一些命令. 1.删除一个容器(删除之前先要停止该容器) docker stop 容器IDdocker r ...

  7. 分布式系统监视zabbix讲解七之分布式监控--技术流ken

    分布式监控 概述 Zabbix通过Zabbix proxy为IT基础设施提供有效和可用的分布式监控 代理(proxy)可用于代替Zabbix server本地收集数据,然后将数据报告给服务器. Pro ...

  8. 一张图,让你和面试官聊一个小时的“Java内存模型”

    如果面试官问你:你了解 Java 内存模型吗? 你就可以使用这张图,按照这张图中的顺序和面试官开聊,正常情况下,聊一个小时是差不多的,这个时候,对你的处境是非常有益的,因为面试官的时间不多了.

  9. shell编程基础(一): 基本变量和基本符号

    一.shell历史 Shell的作用是解释执行用户的命令,用户输入一条命令,Shell就解释执行一条,这种方式称为交互式(Interactive),Shell还有一种执行命令的方式称为批处理(Batc ...

  10. C#面向对象之多态。

    1.定义:指不同的对象收到相同的消息时,会产生不同的行为,同一个类在不同的场合下表现出不同的行为特征. 比如. class Program { //下面三各类都继承object,但不同类的tostri ...