Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2000 and System.Transactions.TransactionScope()

Is it possible to create LIGHTWEIGHT transactions using TransactionScope() with SQL2000? Or if not, is there a workaround using CommitableTransaction and/or something similar?

So the answer is, basically, "If you want local-to-1-server-transactions on SQL2000, don't use TransactionScope()".

like image 898
Dave R Avatar asked May 09 '26 10:05

Dave R


1 Answers

Lightweight transactions require support for "promotable" transactions. SQL Server 2000 simply does not have support for this. Promotable transactions were added in SQL Server 2005.

Florin Lazar posted an adapter that can be used in specific scenarios. You'll have to judge for yourself if this adapter is appropriate for your environment.

like image 184
hurcane Avatar answered May 12 '26 13:05

hurcane



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!