FIX: System Center Configuration Manager replication process by using BCP APIs fails when there is a large value in an XML column

Applies to: SQL Server 2012 EnterpriseSQL Server 2012 DeveloperSQL Server 2012 Enterprise Core


Consider the following scenario:

  • You use System Center Configuration Manager replication process.

  • The process invokes the bulk copy program utility (BCP) APIs to replicate table data between servers.

  • The table contains an XML data type column.

In this scenario, when the XML file is loaded through BCP, and if the memory sum of all attributes in the XML file is greater than 2 MB, the replication process may fail, and you receive the following error message:

State 42000 - Error 6303 - Message [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]XML parsing: Document parsing required too much memory


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

       Cumulative Update 7 for SQL Server 2016 RTM

       Cumulative Update 4 for SQL Server 2016 SP1

       Cumulative Update 6 for SQL Server 2014 SP2

       Cumulative Update 13 for SQL Server 2014 SP1

       Cumulative Update 9 for SQL Server 2012 Service Pack 3

Note After you install this update, you must enable trace flag 6773 in order to enable this fix. To enable trace flag 6773, see the Trace Flags (Transact-SQL) topic on the Microsoft Developer Network (MSDN) website.


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


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