简体   繁体   中英

UserErrorSqlBulkCopyInvalidColumnLength - Azure SQL Database

I am configuring a Salesforce to Azure SQL Database data copy using Azure Data Factory. There appears to be an issue with the column length, but I am unable to identify which column is actually causing an issue.

How can I gain more insight into exactly what is causing my problem? or what column is really invalid?

{
   "dataRead":18560714,
   "dataWritten":0,
   "rowsRead":15514,
   "rowsCopied":0,
   "copyDuration":34,
   "throughput":533.109,
   "errors":[
      {
         "Code":9123,
         "Message":"ErrorCode=UserErrorSqlBulkCopyInvalidColumnLength,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=SQL Bulk Copy failed due to received an invalid column length from the bcp client.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=The service has encountered an error processing your request. Please try again. Error code 4815.\r\nA severe error occurred on the current command.  The results, if any, should be discarded.,Source=.Net SqlClient Data Provider,SqlErrorNumber=40197,Class=20,ErrorCode=-2146232060,State=1,Errors=[{Class=20,Number=40197,State=1,Message=The service has encountered an error processing your request. Please try again. Error code 4815.,},{Class=20,Number=0,State=0,Message=A severe error occurred on the current command.  The results, if any, should be discarded.,},],'",
         "EventType":0,
         "Category":5,
         "Data":{

         },
         "MsgId":null,
         "ExceptionType":null,
         "Source":null,
         "StackTrace":null,
         "InnerEventInfos":[

         ]
      }
   ],
   "effectiveIntegrationRuntime":"DefaultIntegrationRuntime (East US 2)",
   "usedCloudDataMovementUnits":4,
   "usedParallelCopies":1,
   "executionDetails":[
      {
         "source":{
            "type":"Salesforce"
         },
         "sink":{
            "type":"AzureSqlDatabase"
         },
         "status":"Failed",
         "start":"2018-03-01T18:07:37.5732769Z",
         "duration":34,
         "usedCloudDataMovementUnits":4,
         "usedParallelCopies":1,
         "detailedDurations":{
            "queuingDuration":5,
            "timeToFirstByte":24,
            "transferDuration":4
         }
      }
   ]
}

"Message":"ErrorCode=UserErrorSqlBulkCopyInvalidColumnLength,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=SQL Bulk Copy failed due to received an invalid column length from the bcp client.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=The service has encountered an error processing your request. Please try again. Error code 4815.\\r\\nA severe error occurred on the current command. The results, if any, should be discarded.,Source=.Net SqlClient Data Provider,SqlErrorNumber=40197,Class=20,ErrorCode=-2146232060,State=1,Errors=[{Class=20,Number=40197,State=1,Message=The service has encountered an error processing your request. Please try again. Error code 4815.,},{Class=20,Number=0,State=0,Message=A severe error occurred on the current command. The results, if any, should be discarded.

I have seen that error when trying copy a string from the source to the destination but the column receiving the string on the destination is shorter than the source.

My suggestion is to make sure you selected data types big enough on the destination so they can receive the data from the source. Make sure also the sink has the columns shown in the preview.

To identify which column may be involved, exclude big columns one by one from the source.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM