[英]Azure Linked SQL server from on Premise SQL Server - MSDTC exception
This setup works fine except when there MSDTC service is running. 除了正在运行MSDTC服务时,此设置工作正常。
When the 'DTC' service is running, I am getting the following exception 当“ DTC”服务运行时,出现以下异常
Top level exception message : System.ServiceModel.FaultException: The OLE DB provider "SQLNCLI11" for linked server "Azure_SQLDb" reported an error.
顶级异常消息:System.ServiceModel.FaultException:链接服务器“ Azure_SQLDb”的OLE DB提供程序“ SQLNCLI11”报告了错误。 One or more arguments were reported invalid by the provider.
提供程序报告一个或多个参数无效。 The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "Azure_SQLDb" was unable to begin a distributed transaction.
由于链接服务器“ Azure_SQLDb”的OLE DB提供程序“ SQLNCLI11”无法启动分布式事务,因此无法执行该操作。 OLE DB provider "SQLNCLI11" for linked server "Azure_SQLDb" returned message "The parameter is incorrect.".
链接服务器“ Azure_SQLDb”的OLE DB提供程序“ SQLNCLI11”返回消息“参数不正确。”。
I dont need the Azure linked server for any of the DTC transaction, so I tried disabling this option in the linked server properties to see if it helps but it did not help. 对于任何DTC事务,我都不需要Azure链接服务器,因此我尝试在链接服务器属性中禁用此选项,以查看它是否有帮助,但没有帮助。
I read that we cant have MSDTC connection to the azure SQL db, which is good with me as I will not have any transaction involving between my local db and azure sql db. 我读到我们无法与Azure SQL db建立MSDTC连接,这对我来说很好,因为我在本地db和Azure SQL db之间不会涉及任何事务。
I would like to have a solution to run DTC service running in my server machine when there is a linked server connection to the azure sql db. 当有与Azure SQL db的链接服务器连接时,我想拥有一种在服务器计算机上运行DTC服务的解决方案。
@dks The problem you are hitting is not normal - generally it would only happen if your application is trying to start a distributed transaction to coordinate state changes. @dks您遇到的问题是不正常的-通常只有在您的应用程序试图启动分布式事务以协调状态更改时才会发生。 (Sometimes applications use distributed transactions to coordinate state change between an app and data tier, so perhaps that is happening in your case).
(有时,应用程序使用分布式事务来协调应用程序和数据层之间的状态更改,因此您的情况可能正在发生这种情况)。 If you are running from EF or similar, please check to make sure that it is not starting a DTC on your behalf.
如果您从EF或类似版本运行,请检查以确保它没有代表您启动DTC。
In any event, I suggest you move to the latest OLEDB provider. 无论如何,我建议您转到最新的OLEDB提供商。 Last year Microsoft introduced an updated provider and you can download it here:
去年,Microsoft引入了更新的提供程序,您可以在此处下载:
https://www.microsoft.com/en-us/download/details.aspx?id=56730 https://www.microsoft.com/en-us/download/details.aspx?id=56730
Azure SQL Database does not support distributed transactions. Azure SQL数据库不支持分布式事务。
Distributed Transactions in SQL Database SQL数据库中的分布式事务
SQL Database does not support distributed transactions, which are transactions that multiple transaction managers (multiple resources). SQL数据库不支持分布式事务,分布式事务是具有多个事务管理器(多个资源)的事务。 For more information, see Distributed Transactions (ADO.NET) .
有关更多信息,请参见分布式事务(ADO.NET) 。 This means that SQL Database doesn't allow Microsoft Distributed Transaction Coordinator (MS DTC) to delegate distributed transaction handling.
这意味着SQL数据库不允许Microsoft分布式事务处理协调器(MS DTC)委派分布式事务处理。 Because of this you can't use ADO.NET or MSDTC to commit or rollback a single transaction that spans across multiple SQL Databases or a combination of SQL Database and an on-premise SQL Server.
因此,您不能使用ADO.NET或MSDTC来提交或回滚跨越多个SQL数据库或SQL数据库和本地SQL Server组合的单个事务。
For more details, you can see here : Handling Transactions in Windows Azure SQL Database . 有关更多详细信息,请参见此处: Windows Azure SQL数据库中的事务处理 。 Reference blob: Distributed transaction similar to MSDTC between SQL Server azure and MSMQ\\queue azure.
参考blob: SQL Server Azure和MSMQ \\ queue Azure之间的类似于MSDTC的分布式事务。
I think there is no solution can help you. 我认为没有解决方案可以帮助您。
Hope this can helps you. 希望这可以对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.