Distributed Transactions

Thus far, our discussion has been limited to transactions on a single database. What if more than one database is involved? What if more than one database server is involved? What if a nondatabase operation, such as modifying an in-memory cache, is involved? Can you use BEGIN TRANSACTION to bind other such operations within a single transaction? Unfortunately, you cannot. BEGIN TRANSACTION works only on local transactions dealing with data in a database. These transactions do not apply to an in-memory cache, since no transaction logging mechanism is available.

In this section, we’ll look at a deeper theory of transactions and explore a namespace in the .NET Framework named System.Transactions. You’ll also see why a transaction ...

Get Programming Microsoft® SQL Server™ 2008 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.