When to use Transactions in SQL Server

You use transactions when the set of database operations you are making needs to be atomic.

That is – they all need to succeed or fail. Nothing in between.

Transactions are to be used to ensure that the database is always in a consistent state.

In general, unless there is a good reason not to use them (long running process for instance), use them. See this blog post for details.


Try/Catch blocks have nothing to do with transactions – they are used for exception handling. The two concepts are not related and are not replacements for each other.

Leave a Comment

error code: 521