![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Our project is using the System.Transactions.TransactionScope class to provide an ambient transaction which our DAL classes can leverage. I'm looking for some information about the TransactionScope class to answer a few questions about how it behaves when a transaction is promoted to a distributed transaction. Our environment is ASP.NETv2 on Win2003 calling db server running SQL2005. In pseudo-code, we do something like this: Using (scope1 = New TransactionScope()) DalA.IssueInsertAndUpdateStatementsToDb1() Using (scope2 = New TransactionScope(TransactionScopeOptions.Suppress) ) DalB.IssueInsertToDb2() scope2.Complete() End Using scope1.Complete() End Using The first TransactionScope is used to create a transaction for a series of DAL inserts and updates to our primary database. Then we start a second, nested scope with the transaction option set to "Suppress" and it is used to insert a record into a second database (on the same db server). Both databases are configured for a default isolation level of ReadCommitted, but we are seeing some transactions come across at the Serializable isolation level. My question is: is the Serializable isolation level being caused by the use of TransactionScope (and its implicit use of DTC)? If we were to provide the appropriate TransactionOption class to the constructor of each scope object, would it provide us with ReadCommitted isolation level, or does the use of DTC always force the use of Serializable? Thanks, Chris |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |