O'Reilly logo

Microsoft SQL Server 2014 Unleashed by Paul Bertucci, Alex T. Silverstein, Chris Gallelli, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transactions and Stored Procedures

Because SQL code in stored procedures runs locally on the server, it is recommended that entire transactions be completely encapsulated within stored procedures to speed transaction processing. This way, the entire transaction executes within a single stored procedure call from the client application, rather than being executed across multiple requests. The less network traffic that occurs between the client application and SQL Server during transactions, the faster they can finish.

Another advantage of using stored procedures for transactions is that doing so helps you avoid the occurrence of partial transactions—that is, transactions that are started but not fully committed. Using stored procedures this way ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required