Quick question about the TransactionScope object. Found this on the internet:
When you access your first durable resource manager, a lightweight committable transaction is created to support the single transaction. When you access a second durable resource manager, the transaction is promoted to a distributed transaction.
That seems fine, but I didnt understand what exactly is a "durable resource". I know that TransactionScope only works with SQL Server 2005 and above so if I need to access SQL server 200, it wont be possible? How about a text file on the disk? I've always heard that you cant have transaction control when it involves disk access. Maybe is it different with this object?
Thanks!
The TransactionScope class provides a simple way to mark a block of code as participating in a transaction, without requiring you to interact with the transaction itself. A transaction scope can select and manage the ambient transaction automatically.
TransactionScope is a class of System Namespace. It can also be termed as Transactions Namespace. The TransactionScope class supports transactions from code blocks and that is why it plays a key role in the . NET development framework. This class usually manages local as well as distributed transactions from our code.
Transaction management escalation describes the process of migrating a transaction from one of the transaction manager's components to another. System. Transactions includes a transaction manager component that coordinates a transaction involving at most, a single durable resource or multiple volatile resources.
This link discusses the differences between durable and volatile resource managers.
Just to clarify - TransactionScopes will work with earlier versions of SQL, however, the lightweight transaction manager only works for 2005+. DTC will be required for transactions to SQL 2000.
There is also support for transactional file systems (Vista and later) - have a look here.
Resource Managers are of two types
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With