sidGupta
sidGupta

Reputation: 57

SQL Server Locking and deadlocks

I have 2 concurrent processes which update different rows on the same table but one of them is chosen as a "Deadlock victim" and has to be redone.

On what level does locking take place in SQL server ? Does it take place on the table level or on row level ?

Upvotes: 0

Views: 77

Answers (1)

Celimpilo Mncwango
Celimpilo Mncwango

Reputation: 133

If all concurrent transactions access objects in the same order, deadlocks are less likely to occur. try doing this and see if that makes a difference but it has solved my problem before.

SQL Server version 6.5 optionally uses row- level locking for insert operations and uses page-level locking for other operations.

Upvotes: 1

Related Questions