Azure SQL DMS 内部的 DW 死锁

Azure SQL DW deadlock inside DMS

我们在 DMS 内部遇到死锁,至少有 30% 或更多的时间发生在几个较大的存储过程上,这些存储过程 运行 处理并插入数百万行。但是,只有一个查询 运行ning,所以我不明白死锁怎么会是我的错:

Msg 110802, Level 16, State 1, Line 1
110802;An internal DMS error occurred that caused this operation to fail. Details: Exception: Microsoft.SqlServer.DataWarehouse.DataMovement.Workers.DmsSqlNativeException, Message: SqlNativeBufferReader.Run, error in OdbcExecuteQuery: SqlState: 40001, NativeError: 1205, 'Error calling: SQLExecDirect(this->GetHstmt(), (SQLWCHAR *)statementText, SQL_NTS), SQL return code: -1 | SQL Error Info: SrvrMsgState: 71, SrvrSeverity: 13,  Error <1>: ErrorMsg: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Transaction (Process ID 2265) was deadlocked on lock | generic waitable object resources with another process and has been chosen as the deadlock victim. Rerun the transaction. | Error calling: pReadConn->ExecuteQuery(statementText, bufferFormat) | state: FFFF, number: 7801, active connections: 120', Connection String: Driver={pdwodbc};APP=TypeC01-DmsNativeReader:DB3\mpdwsvc (13732)-ODBC;Trusted_Connection=yes;AutoTranslate=no;Server=\.\pipe\DB.3-b6c0a7b26544\sql\query

并且:

110802;An internal DMS error occurred that caused this operation to fail. Details: Exception: Microsoft.SqlServer.DataWarehouse.DataMovement.Workers.DmsSqlNativeException, Message: SqlNativeBufferReader.Run, error in OdbcExecuteQuery: SqlState: 40001, NativeError: 1205, 'Error calling: SQLExecDirect(this->GetHstmt(), (SQLWCHAR *)statementText, SQL_NTS), SQL return code: -1 | SQL Error Info: SrvrMsgState: 71, SrvrSeverity: 13,  Error <1>: ErrorMsg: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Transaction (Process ID 804) was deadlocked on lock | generic waitable object resources with another process and has been chosen as the deadlock victim. Rerun the transaction. | Error calling: pReadConn->ExecuteQuery(statementText, bufferFormat) | state: FFFF, number: 8106, active connections: 240', Connection String: Driver={pdwodbc};APP=TypeC01-DmsNativeReader:DB38\mpdwsvc (14728)-ODBC;Trusted_Connection=yes;AutoTranslate=no;Server=\.\pipe\DB.38-b6c0a7b26544\sql\query

这一点是否明显需要检查或修复?还是 Azure 支持案例是解决问题的最佳途径?

更新:支持案例 115111713384329 已针对此问题开放

更新:我们的 SQL DW 在 2016 年 3 月 4 日获得了一个新的更新,据说可以解决这个问题。 (我无法按需复制它,所以我不能肯定地说。)如果你 运行 "select @@version" 那么 10.0.8224.5 或更高版本应该有修复。如果您还没有修复,我会想象打开一个支持案例并请求它或等待几周会给您修复。

在这种情况下最好创建一个 Azure 支持案例。如果您可以分享您的存储过程,那将有助于我们找到根本原因。