Snapshot or Logreader agents fail when destination table is empty in SQL Server

Symptoms
In a transactional replication in Microsoft SQL Server, an article in an SQL query has an empty string in a destination table (@destination_table = N"") in a Transact-SQL statement. In this situation, you may receive the following error messages in the specified locations:
  • In the Snapshot agent:
    Value cannot be null.Parameter name: strObjectName

  • In the Logreader agent:
    The process could not execute 'sp_replcmds' on 'SERVER'

  • In the error log file:
    SQL Server Assertion: File: <replrowset.cpp>, line=2853 Failed Assertion = 'dwColLen'.

    Note This error may be timing-related. If the error persists after you rerun the statement, use DBCC CHECKDB to check the database for structural integrity. Or, restart the server to make sure that in-memory data structures are not corrupted. A dump file is created in the \Log folder that contains the details of the assertion.

Note The second and third errors are triggered only if publication has the immediate sync option enabled.
Cause
This issue occurs because an empty string is not a valid destination table name.
Workaround
To work around this issue, set a valid destination table name, or remove the invalid destination table name.
Properties

Article ID: 3144065 - Last Review: 04/05/2016 22:33:00 - Revision: 2.0

Microsoft SQL Server 2014 Business Intelligence, Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Enterprise Core, Microsoft SQL Server 2014 Express, Microsoft SQL Server 2014 Standard, Microsoft SQL Server 2014 Web, Microsoft SQL Server 2012 Business Intelligence, Microsoft SQL Server 2012 Developer, Microsoft SQL Server 2012 Enterprise, Microsoft SQL Server 2012 Enterprise Core, Microsoft SQL Server 2012 Express, Microsoft SQL Server 2012 Web, Microsoft SQL Server 2012 Standard

  • kbsurveynew kbtshoot kbexpertiseadvanced KB3144065
Feedback