KB4575939 - FIX: Log reader agent generates access violation exception for P2P or transactional replication with partitioning tables in SQL Server 2016

Applies to: SQL Server 2016 Service Pack 2SQL Server 2016 DeveloperSQL Server 2016 Enterprise


Assume that you have a Peer-to-Peer(P2P) or transactionalreplication on partitioned tables in SQL Server 2016. When you perform partitionswitch or merge operation with pending replicated commands in that partition,you may notice the following error in SQL Server error log. Additionally, log reader agentgenerates an access violation dump.
Error: 608: No catalog entry found for partition ID <ID> in database <DatabaseName>. The metadata is inconsistent. Run DBCC CHECKDB to check for a metadata corruption.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. 


This issue is fixed in the following cumulative update for SQL Server:
Note After applying this fix, if you perform partition switch ormerge operation with pending replicated commands in that partition, you willstill observe error 608 in SQL Server error log, but no access violation dumps.

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:

More Information

If you enable partitionswitching on SQL Server 2008 R2 through the current version, you might alsoneed split and merge operations in the near future. Before executing a split ormerge operation on a replicated table, ensure that the partition in questiondoes not have any pending replicated commands. You should also ensure that noDML operations are executed on the partition during the split and mergeoperations. If there are transactions that the log reader has not processed or if DML operations are performed on a partition of a replicated table while asplit or merge operation is executed (involving the same partition), it couldlead to a processing error with log reader agent. In order to correct theerror, re-initialization of the subscription might be required.

For more information, see Replicate Partitioned Tables and Indexes.

Youshould not enable partition switching for Peer-to-Peer publications due to thehidden column which is used to detect and resolve conflict.


Learn about the terminology that Microsoft uses to describe software updates.