SQL Server Locks Question:
Download Questions PDF

Do you know what guidelines should be followed to help minimize deadlocks?

MS SQL Server Locks Interview Question
MS SQL Server Locks Interview Question

Answer:

Guidelines to minimize deadlocks:-

Avoid user interaction in the transactions. The transaction must not rely on any inputs from the user.
The concurrent transactions must access data in the same order. There should be consistency in which the operations occur
Transactions must be short and simple to avoid deadlocks. Long transactions may block other necessary activities
A lower isolation level like read committed must be used. Using lower isolation levels reduces the possibility of holding shared locks for a longer time
Bound connections should be used. Here, two or more connections opened by the same application can assist each other.

Download MS SQL Server Locks Interview Questions And Answers PDF

Previous QuestionNext Question
Explain different types of lock modes in SQL Server 2000?What is a dead lock?