"The remote server '(null)' does not exist" error occurs after you remove an article from a publication in SQL Server

Symptoms
Assume that you create a transactional publication by using the sp_addpublication stored procedure in SQL Server 2014 or 2016, and you set the @allow_drop property to True. After you drop a table that is published in the publication and manually remove the obsolete article from the publication, you may receive an error message that resembles the following:
The remote server "(null)" does not exist.

For example, this issue occurs in the following scenario:
  • You publish a table in a transactional publication, and then you set the @allow_drop property to True.
  • You remove the published table.
  • Before the Log Reader agent processes the records that are related to the drop table command, you clean up the obsolete article by using one the following stored procedures:
    • sp_MSdropobsoletearticle
    • sp_droparticle
    • sp_droppublication
In this case, the following error messages are logged in a verbose log:
Status: 0, code: 1007, text: 'The process could not execute 'sp_MSadd_replcmds' on 'SQL_SERVER_INSTANCE'.'.
The process could not execute 'sp_MSadd_replcmds' on 'SQL_SERVER_INSTANCE'.
Repl Agent Status: 6
Status: 0, code: 1007, text: 'The remote server "(null)" does not exist, or has not been designated as a valid Publisher, or you may not have permission to see available Publishers.'.
Status: 4, code: 6001, text: 'Background thread for 'Command Loader' is exiting.'.
Status: 0, code: 22020, text: 'Batches were not committed to the Distributor.'.
Status: 0, code: 22037, text: 'The last step did not log any message!'.

Note Drop table support (DROP TABLE DDL) was added in SQL Server 2014 Service Pack 2. For information about drop table support, see the following article in the Microsoft Knowledge Base:
3170123 Supports DROP TABLE DDL for articles that are included in transactional replication in SQL Server 2014

Resolution
This issue is fixed in the following cumulative updates for SQL Server:


About cumulative updates for SQL Server
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
Learn about the terminology Microsoft uses to describe software updates.
Properties

Article ID: 3184227 - Last Review: 09/22/2016 04:04:00 - Revision: 2.0

Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Enterprise Core, Microsoft SQL Server 2014 Standard, Microsoft SQL Server 2016 Developer, Microsoft SQL Server 2016 Enterprise, Microsoft SQL Server 2016 Enterprise Core, Microsoft SQL Server 2016 Standard

  • kbqfe kbfix kbexpertiseinter kbsurveynew KB3184227
Feedback