“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 ...
随机推荐
- ASP.Net Core中使用jquery-ajax-unobtrusive替换Ajax.BeginForm
在大潮流下,大家都在研究MVVM框架,但是做面向搜索引擎的外网项目还是得用服务器渲染. 在.Net中肯定就是用Razor模板引擎了. .Net Core断臂式重构后,很多在老得Mvc中使用得好好的一些 ...
- pandas 基本操作
1. 一维数据结构Series a. 概念:Series 是pandas 的一维数据结构,有重要的两个属性 index 和values b. 初始化: 可以通过 python 的 Lis ...
- Standford CoreNLP使用
1.官网https://stanfordnlp.github.io/CoreNLP/ 2. 待续...
- code——tmp
#include<queue> #include<vector> #include<cstdio> #include<algorithm> #defin ...
- 【开源GPS追踪】 之 手机端安卓版
GPS追踪,后台是利用的是开源的Opengts,可以通过web方式浏览位置信息.这里介绍一款手机端软件go Tracker. 这款软件是在Google app 上找到的,目前还没有找到源码,用了几天有 ...
- GitHub用法
注意: 在push之前要先git pull origin融合代码使得本地代码版本更新,从而才能进行push!! 详细内容参见->这里 本篇内容转自->这里 作者:知乎用户链接:https: ...
- [机器学习入门篇]-Logistic函数与Softmax函数
1.Logistic函数 在维基百科中,对logistic函数这样介绍道: A logistic function or logistic curve is a common "S" ...
- python 数据类型元组与字典内置方法
1.元组 (1)元组是不可变的列表,能存多个值:如果多个值只有取得需求,没有改的需求,用元组最合理 (2)定义:在()内用逗号隔开,可以存任意类型的值 注意:当元组只有一个元素时,要在后面加逗号 # ...
- 种花 [JZOJ4726] [可撤销贪心]
Description 经过三十多个小时的长途跋涉,小Z和小D终于到了NOI现场——南山南中学.一进校园,小D就被花所吸引了(不要问我为什么),遍和一旁的种花园丁交(J)流(L)了起来. 他发现花的摆 ...
- 2017.07.10【NOIP提高组】模拟赛B组
Summary 今天题目总体不是难,但是分数很低,只有100+10+30,其中第二题还是以前做过的,第一题设计数论,而且以前做过同一个类型的题目,比赛推了很长时间.第三题时以前做过的原题,是贪心没学好 ...