7

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!

Diego
  • 34,802
  • 21
  • 91
  • 134

2 Answers2

6

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.

Community
  • 1
  • 1
StuartLC
  • 104,537
  • 17
  • 209
  • 285
3

Resource Managers are of two types

  • Durable: transactions are durable even when system failures occur.Resource Managers memorize state of a transaction. If system is shut down in between then upon restart Transaction can proceed from its previous state. for e.g. SQL Server DBMS and MSMQ.
  • Volatile: Non-resistant to system failures, e.g. This transactional implementation of some core .Net classes.
Abhijeet Nagre
  • 876
  • 1
  • 11
  • 21