Symptoms
Assume that you create a Peer-to-Peer (P2P) publication in Microsoft SQL Server and add a stored procedure execution article to it. When the stored procedure is executed at the Publisher, replication executes the corresponding procedure at the Subscriber. However, when you try to drop the stored procedure execution article, you may receive an error message that resembles the following:
Cannot drop article ProcedureName.
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot continue the execution because the session is in the kill state.
A severe error occurred on the current command. The results, if any, should be discarded.
Changed database context to DatabaseName. (Microsoft SQL Server, Error: 596)
Resolution
This issue is fixed in the following cumulative updates for SQL Server:
Cumulative Update 1 for SQL Server 2017
Cumulative Update 8 for SQL Server 2016 RTM
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:
Latest cumulative update for SQL Server 2017
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 terminologythat Microsoft uses to describe software updates.