:::: MENU ::::

Posts Categorized / Locking Mechanism

  • Nov 29 / 2008
  • 0
dbDigger, Locking Mechanism, Performance Tunning and Optimization

Reduce locks in SQL Server

To reduce locks in your database, encapsulate all transactions within stored procedures, including both the BEGIN TRANSACTION and COMMIT TRANSACTION statements in the procedure. This provides two benefits that help to reduce blocking locks.
First, it limits the client application and SQL Server to communications before and after the transaction, thus forcing any messages between the client and the server to occur at a time other than when the transaction is running (reducing transaction time).
Second, it prevents the user from leaving an open transaction (holding locks open) because the stored procedure forces any transactions that it starts to complete or abort.
Consult us to explore the Databases. Contact us