1Replication-replicationdistributionsubsystemagentnullfailed.thepublicationXXXdoesnotexist can be seen literally that the current subscription has not been published, but the corresponding distribution agent has not been deleted for some reason. This error can be found in distr
1 Replication-replication distribution subsystem agent null failed. the publication XXX does not exist can be seen literally that the current subscription release does not exist, but the corresponding distribution agent is not deleted for some reason and continues to run, this error occurs. This error can be found in distr
1
Replication-replication distribution subsystem agent null failed. the publication XXX does not exist
Literally, we can see that the current subscription release does not exist, but the corresponding distribution agent is not deleted for some reason. This error will occur when it continues to run.
This error can be found in the error log of distributor or in the MSrepl_errors table.
How to solve A1: execute the following statement in the distribution database of the distributor Server:
Select publisher, subscriber From MSsubscriber_info
The above query lists the comparison between "publish" and "subscribe", but in fact it does not play a role in troubleshooting, because the subscription information may have been deleted from Mssubscriber_info, you cannot find out which 'subscriber' is making such invalid requests. what we can do is to find out the potential subscribers by memory...
Find a possible subscription and check the membership records of the corresponding job:
You can delete the corresponding subscription.
2
In pull mode,Check the jobs corresponding to the distribution agent and view its history., The following error is found:
Agent message code 20084. The process cocould not connect to Distributor 'xxxxx '.
In the errorlog of the distributor, find the information about the distribution agent Account Logon failure.
SolutionCreate a login for the distribution agent account in the distirbutor
3
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.
Solution:It may be that publisher cannot be connected, or the permission is missing. Determine whether the distribution agent account belongs to the PAL. If not, add
Exec sp_help_publication_access @ publication = N 'publicationname'
List Members of the PAL.
4
In push mode, the distribution agent has the following error:
Agent message code 14260. You do not have sufficient permission to run this command. Contact your system administrator
Check whether the following conditions are met:
Distribution Agent for a push subtasks |
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 ofDb_ownerFixed 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 Subscriber is for a non-SQL Server Subscriber. The account that is used to connect to the Subscriber must at minimum be a member ofDb_ownerFixed database role in the Subscriber database, or have equivalent permissions if the Subscriber is for a non-SQL Server Subscriber. |
5
View replication Monitor/dbo. MSrepl_errors
The following error is reported:
Command:
If @ trancount> 0 rollback tran
(Transaction serial number: 0x0000003A000001DB006800000000, command ID: 3)
Error message:
· The row cannot be found on the subscription server when the command of application replication is run. (Source: MSSQLServer; error code: 20598)
For help: http: // help/20598
· The row cannot be found on the subscription server when the command of application replication is run. (Source: MSSQLServer; error code: 20598)
For help: http: // help/20598
The original cause of this error may be: A data Row A in the subscription server is deleted (by mistake), and the publisher needs to modify/Delete the record, after deletion, the result will be updated to the subscription. At this time, A does not exist on the subscription server...
You can run the following statement on the distributor to obtain the specific error information.
Sp_browsereplcmds '0x0000003a000001db0068000000000000', '0x0000003a000001db0068000000000000'
As shown in the preceding figure, a statement for deleting 100 rows of data is executed in the release database. After the information is transmitted to the distribution database, the distribution database calls sp_MSdel_dbotx 100 times to synchronize the data. from the previous error information, we can see that the problem occurs when the third statement is executed:
The distribution agent encountered the preceding error after executing the sp_MSdel_dbotx statement. Sp_Msdel_dbotx is defined when an object is added to a release. The default naming rule is sp_MS + operation + schemaName + tableName.
You can use the following query to locate a specific table.
Use [distribution]
Select * From MSarticles where article_id = @ article_id
The specific definitions can be viewed in the subscriber subscription library.
Use [subDBName]
Exec sp_helptext [sp_MSdel_dbota]
SolutionIs to re-insert the deleted row in the subscription. The primary key is the parameter in sp_MSdel_dbota.
6
Cannot drop the database XXX because it is being used for replication
Exec sp_removedbreplication 'database'