“The subscription does not exist” when a distributor primary replica fails over to a replica that does not use the same agent profile
Symptoms
Consider the following scenario:
- In Microsoft SQL Server 2017, you have a distribution agent that does not use a default agent profile.
- The distribution database is added to the availability group (AG).
- The primary replica of the distribution database fails over to a replica that does not use the exact same agent profile.
In this scenario, the distribution agent fails, and you receive the following error message :
The subscription does not exist.
Cause
Agent profiles are managed and persisted in the msdb database. Changes to an agent profile are persisted in msdb and cannot be sent to other distributors in the distribution database AG.
Replication agents are associated with profile through profile_id. After a failover, the agent might be unable to find the correct profile. Alternatively, it might find the wrong profile. This is because a nondefault profile in one distributor could differ from that of another distributor, or it may never have existed, or it may have a different profile_id.
The distribution agent job issues the sp_MShelp_distribution_agentid stored procedure to get the agent ID when it starts. If the profile does not exist, or if the profile IDs are different, the distribution agent job does not get the agent ID, and it returns the "subscription does not exist" error message.
Workaround
To work around this issue, use one of the following methods.
Method 1 Specify the parameters in the distribution agent command directly, instead of using the agent profile. Also, apply the changes to the distribution agent job in all Distributor replicas.
Method 2 Make sure that the agent profile is created in all Distributors that are participating in the distribution database in the AG, and make sure that the profile IDs are the same.
The distribution agent runs the sp_MShelp_distribution_agentid stored procedure to get the agent profile. If the agent profile does not exist, or if the profile ID is different, the correct agent profile is not found, and the “The subscription does not exist” error message is returned.
To prevent this issue, specify the correct agent profile (profile ID) in the sp_MShelp_distribution_agentid stored procedure.
The following is a code segment of the sp_MShelp_distribution_agentid stored procedure:
select distribAgent.id , distribAgent.name , distribAgent.publisher_database_id , distribAgent.publisher_db , distribAgent.subscriber_db , profileName.profile_id , profileName.profile_name from MSdistribution_agents as distribAgent INNER JOIN msdb..MSagent_profiles as profileName on distribAgent.profile_id = profileName.profile_id
https://support.microsoft.com/en-us/help/4488815/subscription-does-not-exist-when-distributor-primary-replica-fails
This is a design issue, may be addressed in further version....
“The subscription does not exist” when a distributor primary replica fails over to a replica that does not use the same agent profile的更多相关文章
- RAC的QA
RAC: Frequently Asked Questions [ID 220970.1] 修改时间 13-JAN-2011 类型 FAQ 状态 PUBLISHED Appli ...
- RocketMQ 拉取消息-通信模块
首先看server端:class NettyRemotingServer extends NettyRemotingAbstract implements RemotingServer 下面这个实现了 ...
- 再说rocketmq消息存储
两篇精彩的文章: <RocketMQ源码 — 三. Producer消息发送过程> <RocketMQ源码解析:Message存储> rocketmq通过netty获取到消息请 ...
- rocketmq 问题
1. 收不到消息-consumerOffset.json 信息错位 这种情况一般是,手动删除了store/commitlog目录里的数据等非常规手段造成了consumerOffset.json中记录的 ...
- Residential Gateway System for Home Network Service
Disclosed herein is a Residential Gateway (RG) system for home network service. The RG system receiv ...
- COM Error Code(HRESULT)部分摘录
Return value/code Description 0x00030200 STG_S_CONVERTED The underlying file was converted to compou ...
- RocketMQ 源码分析 —— Message 发送与接收
1.概述 Producer 发送消息.主要是同步发送消息源码,涉及到 异步/Oneway发送消息,事务消息会跳过. Broker 接收消息.(存储消息在<RocketMQ 源码分析 —— Mes ...
- 【RocketMQ】消息的消费
上一讲[RocketMQ]消息的拉取 消息消费 当RocketMQ进行消息消费的时候,是通过ConsumeMessageConcurrentlyService的submitConsumeRequest ...
- Django基础,Day2 - 编写urls,views,models
编写views views:作为MVC中的C,接收用户的输入,调用数据库Model层和业务逻辑Model层,处理后将处理结果渲染到V层中去. polls/views.py: from django.h ...
随机推荐
- dns服务扩展
- html 知识点
web服务本质 import socket def main(): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind ...
- Summary
PDF 暑假开始准备转移博客,试了几个都不怎么满意(我还去试了下LineBlog 不知道那时候在想什么..),屯着一堆文章,,到时候一起发了 现在暂时转移至WordPress,不过还在完善中,预计.. ...
- csdn 站点使用
大学时使用csdn下载软件资源,最终csdn成为一个it中很重要站点,csdn的运营方式值得思考.
- LR逻辑回归文章
http://blog.csdn.net/suipingsp/article/details/41822313
- 【DWM1000】 code 解密1一 去掉Main 函数多余内容
蓝点DWM1000 模块已经打样测试完毕,有兴趣的可以申请购买了,更多信息参见 蓝点论坛 正文: 室内定位兴起,DWM1000 作为超宽带UWB的代表,在国内用的越来越多,但是可见资料非常少. 一方面 ...
- 【开源GPS追踪】 之 服务器硬伤
前面就说过了,目前GPS 追踪的原理都是通过GPRS将数据发送到一个服务器上,如果回看数据就从服务器上去数据,服务器在整个系统中具有举足轻重的地位. 如果服务器坏了,整个系统几千台设备可能也就无法工作 ...
- 关于数据ajax请求
默认设置下,所有请求均为异步请求.如果需要发送同步请求,请将此选项设置为 false.注意,同步请求将锁住浏览器,用户其它操作必须等待请求完成才可以执行. var temp; $.ajax({ asy ...
- LINUX配置Django
django项目: 依赖包[root@web01 ~]# yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-d ...
- BZOJ4223 : Tourists
将位置划分成$O(m)$段区间,每段最早被阻挡的时间可以用堆维护. 那么每段区间对询问的贡献独立,扫描线处理即可. 时间复杂度$O(m\log m)$. #include<cstdio> ...