视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
事物发布出现中断如:(事务序列号:0x0000003A000001DB006800000
2020-11-09 07:20:36 责编:小采
文档


1 Replication-replication distribution subsystem agent null failed. the publication XXX does not exist 从字面上可以看到,当前订阅的发布已经不存在了,而相应的分发代理却因为某些原因没有被删除,继续运行,就会出现这种错误。 这个错误可以在distr

1

Replication-replication distribution subsystem agent null failed. the publication XXX does not exist

从字面上可以看到,当前订阅的发布已经不存在了,而相应的分发代理却因为某些原因没有被删除,继续运行,就会出现这种错误。

这个错误可以在distributor的错误日志中,或者MSrepl_errors表中看到.

A1 如何解决:在distributor服务器中的分发数据库中执行如下语句

select publisher,subscriber From MSsubscriber_info

上面的查询列出“发布”与"订阅”的对照关系,但实际上对我们排错并没有什么作用,因为此时订阅的信息很可能已经从Mssubscriber_info中删除了,你无法的找到到底是哪些’subscriber’在进行这种无效的请求.我们能做的也只有凭借记忆找出到底那些可能的订阅者了…

找到可能的订阅,检查其对应的job的隶属记录:

就可以将对应的订阅删除了

2

pull模式下,在复制监视器中看到大量的”为分发的命令”,检查distribution agent对应的作业,查看其历史记录,发现如下错误:

Agent message code 20084. The process could not connect to Distributor 'XXXXX'.

在distributor的errorlog找到distribution agent帐号登录失败的信息。

解决方法 为distribution agent帐号在distirbutor创建登录

3

2011-04-03 17:37:05.853 Connecting to Distributor ‘XXX’
The remote server "%s" does not exist, or has not been designated as a valid Publisher, or you may not have permission to see available Publishers.

解决方法:可能是publisher已经无法连接,或者缺少权限。确定distribution agent帐号是否属于PAL,如果不是则添加

exec sp_help_publication_access @publication = N'publicationName'

会列出PAL的成员

4

在push模式下,分发代理出现如下错误:

Agent message code 14260. You do not have sufficient permission to run this command. Contact your system administrator

检查是否符合如下条件:

Distribution Agent for a push subscription

The Windows account under which the agent runs is used when it makes connections to the Distributor. This account must:

· At minimum be a member of the db_owner fixed database role in the distribution database.

· Be a member of the PAL.

· Have read permissions on the snapshot share.

· Have read permissions on the installation directory of the OLE DB provider for the Subscriber if the subscription is for a non-SQL Server Subscriber.

The account that is used to connect to the Subscriber must at minimum be a member of the db_owner fixed database role in the subscription database, or have equivalent permissions if the subscription is for a non-SQL Server Subscriber.

5

查看复制监视器/dbo.MSrepl_errors

遇到如下错误:

尝试的命令:

if @@trancount > 0 rollback tran
(事务序列号: 0x0000003A000001DB006800000000,命令 ID: 3)

错误消息:

· 应用复制的命令时在订阅服务器上找不到该行。 (源: MSSQLServer,错误号: 20598)
获取帮助: http://help/20598

· 应用复制的命令时在订阅服务器上找不到该行。 (源: MSSQLServer,错误号: 20598)
获取帮助: http://help/20598

出现这种错误的原始可能是:订阅服务器中的一个数据行A被(误)删除了,而发布服务器要修改/删除A这条记录,顺利删除后要将结果更新到订阅,此时订阅服务器中A已经不存在了…

可以在distributor上执行如下语句,获得具体错误信息

sp_browsereplcmds '0x0000003A000001DB006800000000','0x0000003A000001DB006800000000'

从上面的截图可以看出,一个删除100行数据的语句在发布库执行, 将相应的信息传递到分发后,分发库调用100次sp_MSdel_dbotx来完成数据的同步. 从之前的错误信息进一步看到,其中的第三条语句执行时到了问题:

分发代理在执行sp_MSdel_dbotx这条语句后出现了上述的错误。Sp_Msdel_dbotx这个存储过程的定义是在将对象添加到发布是定义的。默认的命名规则是sp_MS+operation+schemaName+tableName

可以通过下面这个查询定位到具体表

Use [distribution]

select *From MSarticles where article_id=@article_id

具体的定义可以在subscriber的订阅库中查看

use [subDBName]
exec sp_helptext [sp_MSdel_dbota]

解决方式是将删除的行在订阅中重新插入,主键就是sp_MSdel_dbota里的参数。

6

Cannot drop the database XXX because it is being used for replication

exec sp_removedbreplication 'database'

下载本文
显示全文
专题