Microsoft SQL Server 2008 R2 Unleashed- P106:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | This page intentionally left blank Download from CHAPTER 31 Transaction Management and the Transaction Log Transaction management is an important area in database programming. The transactions you construct and issue can have a huge impact on the performance of SQL Server and the consistency of your databases. This chapter looks at the methods for defining and managing transactions in SQL Server 2008. What s New in Transaction Management Not much has really changed in SQL Server 2008 related to transactions transaction logging and transaction management. About the only real change is the removal of the WITH TRUNCATE_ONLY and WITH NO_LOG options from the BACKUP LOG command. These options are no longer available in SQL Server 2008 to prune the transaction log. The alternative is to switch the database to simple recovery model. IN THIS CHAPTER What s New in Transaction Management What Is a Transaction How SQL Server Manages Transactions Defining Transactions Transactions and Batches Transactions and Stored Procedures Transactions and Triggers Transactions and Locking Coding Effective Transactions Transaction Logging and the Recovery Process Long-Running Transactions Bound Connections Distributed Transactions What Is a Transaction A transaction is one or more SQL statements that must be completed as a whole or in other words as a single logical unit of work. Transactions provide a way of collecting and associating multiple actions into a single all-or-nothing multiple-operation action. All operations within the transaction must be fully completed or not performed at all. Consider a bank transaction in which you move 1 000 from your checking account to your savings account. This Download from 996 CHAPTER 31 Transaction Management and the Transaction Log transaction is in fact two operations a decrement of your checking account and an increment of your savings account. Consider the impact on your finances if the bank s server went down .