What is a dead lock?

Submitted by: Administrator
When two computer programs sharing the same resource prevent each other from accessing the resource results in a deadlock. This deadlock results in finishing the program.

Example:

P1 requests R1 and receives it.
P2 requests R2 and receives it.
P1 requests resource R2 and is queued up, pending the release of R2.
P2 requests resource R1 and is queued up, pending the release of R1

Here, P and R is Program and Resource respectively.
Submitted by: Administrator

Read Online SQL Server Locks Job Interview Questions And Answers