![]() SQL Server deadlock monitoring mechanisms This situation is known as a SQL Server deadlock. ![]() In this case, neither of the transactions can proceed because each transaction requires a resource held by the other transaction. John already has an exclusive lock on the customer table. Peter requires an exclusive lock on the customer table to finish his transaction.Peter already has an exclusive lock on the orders table. John requires an exclusive lock on the orders table to finish his transaction.Peter has an exclusive lock on the orders table for the customer id 1.John has an exclusive lock on the customer table for the customer id 1.Now, suppose in another scenario, John and Peter have the following locks. In this case, Peter needs to wait until John finishes his work and releases the exclusive lock. This row already has an exclusive lock for John. It tries to take a shared lock to read the row.It acquires an intent shared (IS) lock on the customer table and the page that contains the record as per the where clause.It prevents any other user from modifying the row data until process A releases its lock. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |