what kind of operation were you doing inside the database? can you try to handle the exception for the database operation to see the exact error message?

解决方案 »

  1.   

    DTC返回的错误值是8509,MSDTC倒入事务失败
    初步判定是数据库服务器在防火墙后面,导致动态分配的部分RPC端口被防火墙拦住了,没有拦住的那些才能成功
    并由此导致其他没有被防火墙拦住的连接(其他参与事物,但没有安装防火墙的数据库连接)回收到连接池后,出现问题,这个问题比较奇怪,导致我没有事务的数据库操作失败
      

  2.   

    Message: MSDTC 事务的导入失败: Result Code = 0x8004d00e。
    Type: System.Data.SqlClient.SqlException
    SourceAssembly: .Net SqlClient Data Provider
    Method: Void OnError(System.Data.SqlClient.SqlException, System.Data.SqlClient.TdsParserState)
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, TdsParserState state)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, TdsParserState state)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior run, SqlCommand cmdHandler, SqlDataReader dataStream)
       at System.Data.SqlClient.TdsParser.PropagateDistributedTransaction(Byte[] buffer, Int32 length, Int32 timeout)
       at System.Data.SqlClient.SqlInternalConnection.EnlistNonNullDistributedTransaction(ITransaction transaction)
       at System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction(ITransaction newTransaction, Guid newTransactionGuid)
       at System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
       at System.Data.SqlClient.SqlInternalConnection.Activate(Boolean isInTransaction)
       at System.Data.SqlClient.SqlConnection.Open()Database Error--------------------------------  
          Line:1 
         Msg:MSDTC 事务的导入失败: 
    Result Code = 0x8004d00e。    
      Number:8509   
       proc:     
     state: 1