Skip to content

Fix | Enable SqlBulkCopy to target tables in Azure Synapse Analytics dedicated SQL pools#4176

Merged
paulmedynski merged 3 commits into
dotnet:mainfrom
edwardneal:fix/issue-4149
Apr 13, 2026
Merged

Fix | Enable SqlBulkCopy to target tables in Azure Synapse Analytics dedicated SQL pools#4176
paulmedynski merged 3 commits into
dotnet:mainfrom
edwardneal:fix/issue-4149

Add explanatory comment

5397173
Select commit
Loading
Failed to load commit list.
Azure Pipelines / PR-SqlClient-Project succeeded Apr 13, 2026 in 45m 41s

Build #10301 had test failures

Details

Tests

  • Failed: 6 (0.00%)
  • Passed: 243,708 (97.39%)
  • Other: 6,518 (2.60%)
  • Total: 250,232

Annotations

Check failure on line 81 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Build log #L81

Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1

Check failure on line 83 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Build log #L83

Dotnet command failed with non-zero exit code on the following projects : [ '/mnt/vss/_work/1/s/build2.proj' ]

Check failure on line 66 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Build log #L66

Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1

Check failure on line 68 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Build log #L68

Dotnet command failed with non-zero exit code on the following projects : [ '/mnt/vss/_work/1/s/build2.proj' ]

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing

Microsoft.Data.SqlClient.SqlException : Transaction (Process ID 533) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Raw output
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 2496
   at Microsoft.Data.SqlClient.Connection.SqlConnectionInternal.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\Connection\SqlConnectionInternal.cs:line 1297
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\TdsParser.cs:line 1739
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\TdsParser.cs:line 3139
   at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3422
   at Microsoft.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3721
   at Microsoft.Data.SqlClient.SqlDataReader.Read() in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3674
   at Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(String query, CommandType commandType, String xEvent) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\tests\ManualTests\TracingTests\XEventsTracingTest.cs:line 132

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "sp_help", commandType: StoredProcedure, xEvent: "rpc_starting")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "sp_help", commandType: StoredProcedure, xEvent: "rpc_starting")

Microsoft.Data.SqlClient.SqlException : Transaction (Process ID 129) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Raw output
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 2493
   at Microsoft.Data.SqlClient.Connection.SqlConnectionInternal.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\Connection\SqlConnectionInternal.cs:line 1297
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\TdsParser.cs:line 1739
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\TdsParser.cs:line 3139
   at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3422
   at Microsoft.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3721
   at Microsoft.Data.SqlClient.SqlDataReader.Read() in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3674
   at Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(String query, CommandType commandType, String xEvent) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\tests\ManualTests\TracingTests\XEventsTracingTest.cs:line 132
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestReaderMars

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestReaderMars

Microsoft.Data.SqlClient.SqlException : The connection is broken and recovery is not possible.  The connection is marked by the client driver as unrecoverable.  No attempt was made to restore the connection.
Raw output
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 2493
   at Microsoft.Data.SqlClient.SqlConnection.ValidateAndReconnect(Action beforeDisconnect, Int32 timeout) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 1768
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean isRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlCommand.Reader.cs:line 1265
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& executeTask, Boolean& usedCache, Boolean asyncWrite, Boolean isRetry, String method) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlCommand.Reader.cs:line 1232
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlCommand.Reader.cs:line 190
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlCommand.Reader.cs:line 131
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader() in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlCommand.Reader.cs:line 95
   at Microsoft.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.OpenNullifyReader(SqlCommand command) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\tests\ManualTests\SQL\WeakRefTestYukonSpecific\WeakRefTestYukonSpecific.cs:line 198
   at Microsoft.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestReaderMarsCase(String caseName, String connectionString, ReaderTestType testType, ReaderVerificationType verificationType, String methodName) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\tests\ManualTests\SQL\WeakRefTestYukonSpecific\WeakRefTestYukonSpecific.cs:line 138
   at Microsoft.Data.SqlClient.ManualTesting.Tests.WeakRefTestYukonSpecific.TestReaderMars() in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\tests\ManualTests\SQL\WeakRefTestYukonSpecific\WeakRefTestYukonSpecific.cs:line 34
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "sp_help", commandType: StoredProcedure, xEvent: "rpc_starting")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "sp_help", commandType: StoredProcedure, xEvent: "rpc_starting")

Microsoft.Data.SqlClient.SqlException : Transaction (Process ID 143) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Raw output
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlConnection.cs:line 2493
   at Microsoft.Data.SqlClient.Connection.SqlConnectionInternal.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\Connection\SqlConnectionInternal.cs:line 1297
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\TdsParser.cs:line 1739
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\TdsParser.cs:line 3139
   at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3422
   at Microsoft.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3721
   at Microsoft.Data.SqlClient.SqlDataReader.Read() in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\src\Microsoft\Data\SqlClient\SqlDataReader.cs:line 3674
   at Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(String query, CommandType commandType, String xEvent) in D:\a\_work\1\s\src\Microsoft.Data.SqlClient\tests\ManualTests\TracingTests\XEventsTracingTest.cs:line 132
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)