Share via

SQL Snapshot Replication Fails with BCP EOF / NULL Errors (Works in Transactional Replication)

Parag Nimbhore 0 Reputation points
2026-04-29T12:20:04.25+00:00

Issue:
We have Snapshot Replication on a production server that was working fine but recently started failing with the below error:

Agent message code 20037. The process could not bulk copy into table "XXX".

Message: End of file reached, terminator missing or field data incomplete
Message:Batch send failed

Message: Failed to send batch after max errors

More details:

Publisher & Distributor: Microsoft SQL Server 2017 (RTM-CU31-GDR) (KB5084818) - 14.0.3525.1 (X64) Standard Edition on Windows Server 2016 Datacenter

Subscriber:

  • Microsoft SQL Server 2022 (RTM-CU24-GDR) (KB5083252) - 16.0.4250.1 (X64) Standard Edition on Windows Server 2022 Datacenter
  • Microsoft SQL Server 2017 (RTM-CU31-GDR) - 14.0.3525.1 (X64) Standard Edition on Windows Server 2016 Datacenter

What we tried:

  1. Dropped table on subscriber + deleted snapshot folder + reinitialized → worked temporarily
  2. Issue reoccurred; same steps no longer fix it
  3. Created new Snapshot Replication → same failure for this table
  4. Created Transactional Replication with same table → works fine

Issue occurs only in Snapshot Replication

 

Findings:

• Suspected issue with datetime2(7) and SNAC 11.0 (BCP native mode)
• Snapshot Agent appears to generate multiple .bcp files (parallel processing)

 

Quick Solution Workaround (working):

  1. To avoid generating multiple .bcp files per table (parallel processing), we added a row filter (WHERE 1 = 1) to the affected articles.

Questions:

  1. Is this a known issue with Snapshot Replication multi-threaded BCP?
  2. Does SNAC 11.0 have limitations with datetime2(7)?
  3. As we cannot add the same filter to every table (due to scale), will upgrading to OLE DB / ODBC Driver 17 or 18 resolve this?
  4. Is there a way to disable BCP partitioning globally (without using row filters)?
SQL Server | Other

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.