Fast transactions with System.Transactions and Microsoft SQL Server 2000

The simplest way to use transactions today with Microsoft SQL Server 2000, using .Net Framework 2.0, is as follows:        static void Main(string[] args)        {            using (TransactionScope ts = new TransactionScope())            {                SqlConnection sqlConnection = new SqlConnection(“connectionString”);                sqlConnection.Open();                SqlCommand sqlCommand = new SqlCommand(“INSERT INTO …”, sqlConnection);                sqlCommand.ExecuteNonQuery();                sqlConnection.Close();                 ts.Complete();            }        } If you really…

19

Writing a resource manager that supports promotable transactions (or Promotable Single Phase Enlistment aka PSPE) in System.Transactions

A key feature that targets performance in System.Transactions is the Promotable Single Phase Enlistment. It allows a durable resource manager (RM) to host and “own” a transaction that can later be promoted to a distributed transaction (or MSDTC transaction) if necessary. This specific resource manager usually has its own internal non distributed transactions and it…

11