msdtc

How to run two Entity Framework Contexts inside TransactionScope without MSDTC?

∥☆過路亽.° 提交于 2019-12-09 05:09:33
问题 This problem is not readily reproducible in a simple example here but was wondering if anyone has any experience and tips, here is the issue: using Entity Framework have many points in application where (1) data is written to some entity table e.g. Customer, (2) data is written to history table both of these actions use Entity Framework, HOWEVER, they use different contexts these actions need to be both in one transaction : i.e. if one fails to write, the other should not write, etc. I can

Trace why a transaction is escalated to DTC

别等时光非礼了梦想. 提交于 2019-12-08 15:07:31
问题 Is there any way to determine precisely why a System.Transaction TrasactionScope is being escalated to the DTC? We are hitting a bump with one of our components that seem to escalate the transaction while all other components (which seem deceptively similar) does not do escalation. Are any information made available on the reasons for the escalation and how can they be found and observed? SQL Profiler? Log files? Or am I out of luck on this one? UPDATE: I'm running against SQL Server 2005 for

nhibernate and transactionscope transaction aborted spontaniously

北慕城南 提交于 2019-12-08 06:37:32
I am working with Nhibernate and TransactionScope in a large application. The application is supposed to modify 3 databases and support a distribuited transaction across them. This is the code that I call each time I want to query or execute some sql on the database within the distribuited transaction: IDbConnection connection = new SqlConnection(connectionString); connection.Open(); ISession session = SessionFactory.OpenSession(connection); And this is the code called whenever after the necessary operations are executed IDbConnection sqlConnection = session.Connection; if (sqlConnection !=

Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction

对着背影说爱祢 提交于 2019-12-06 18:22:08
问题 Just curious if anyone else has got this particular error and know how to solve it? The scenario is as follow... We have an ASP.NET web application using Enterprise Library running on Windows Server 2008 IIS farm connecting to a SQL Server 2008 cluster back end. MSDTC is turned on. DB connections are pooled. My suspicion is that somewhere along the line there is a failed MSDTC transaction, the connection got returned to the pool and the next query on a different page is picking up the

Occasional System.ArgumentNullException using TransactionScope and MS DTC

拈花ヽ惹草 提交于 2019-12-06 13:32:24
问题 I'm occasionaly getting this exception on our production server: System.ArgumentNullException: Value cannot be null. at System.Threading.Monitor.Enter(Object obj) at System.Data.ProviderBase.DbConnectionPool.TransactedConnectionPool.TransactionEnded(Transaction transaction, DbConnectionInternal transactedObject) at System.Data.SqlClient.SqlDelegatedTransaction.SinglePhaseCommit(SinglePhaseEnlistment enlistment) at System.Transactions.TransactionStateDelegatedCommitting.EnterState

Service Bus 1.0 for Windows Server Transaction/Error Handling

纵然是瞬间 提交于 2019-12-06 11:43:42
问题 I'm sure I'm not the first to say it, but there's a severe lack of documentation on the finer points of Service Bus 1.0 for Windows Server out there... I'm hoping some of the MS insiders can help clear a few things up... Do services utilizing queues/topics run in an implicit, ambient transaction? For instance consider the following code snippet: [ServiceBehavior] public class MySbService : IDoWork { [OperationBehavior] void DoSomeWork(WorkRequest request) { DoDatabaseWork();

Intermittent failure to enlist SSIS package in DTC transaction

女生的网名这么多〃 提交于 2019-12-06 03:56:12
问题 Our packages are randomly failing with the following error message: SSIS Error Code DTS_E_OLEDBERROR . An OLE DB error has occurred. Error code: 0x8004D00A. COM error object information is available. Source: "[Some Package Name]" error code: 0x8004D00A Description: "The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D00A "Unable to enlist in the transaction." This doesn't happen all the time, and re-running the package often succeeds, so

How to fix Distributed Transaction Manager (MSDTC) has been disabled errors [closed]

落爺英雄遲暮 提交于 2019-12-05 14:05:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . We are using transaction scope features of ASP.NET to manage distributed transaction for that we need to enable distributed transaction via following link: The partner transaction manager has disabled its support for remote/network transactions Its works well with SQL Server 2005 and Windows Server 2003 but when

How to determine whether SqlConnection is enlisted into a System.Transactions' tx or not?

旧巷老猫 提交于 2019-12-05 00:15:45
问题 When we using a transation from System.Transactions (creating TransationScope for an instance) by default all Sql-connections (System.Data.SqlClient.SqlConnection) (but is't also the true for Oracle.DataAccess.OracleConnection) are enlisted on opening. That's called auto-enlistment. Nice feature. But it can be turned off throught a connection string's parameter (enlist=false). In that case connection being opened wouldn't be enlisted. But it can be enlisted manually later. So my question is:

Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction

微笑、不失礼 提交于 2019-12-04 23:51:06
Just curious if anyone else has got this particular error and know how to solve it? The scenario is as follow... We have an ASP.NET web application using Enterprise Library running on Windows Server 2008 IIS farm connecting to a SQL Server 2008 cluster back end. MSDTC is turned on. DB connections are pooled. My suspicion is that somewhere along the line there is a failed MSDTC transaction, the connection got returned to the pool and the next query on a different page is picking up the misbehaving connection and got this particular error. Funny thing is we got this error on a query that has no