Home > Database, SQL Server > What is a deadlock?

What is a deadlock?

Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to acquire a lock on the other’s piece. Each process would wait indefinitely for the other to release the lock, unless one of the user processes is terminated.
SQL Server detects deadlocks and terminates one user’s process.

A livelock is one, where a request for an exclusive lock is repeatedly denied because a series of overlapping shared locks keeps interfering.
SQL Server detects the situation after four denials and refuses further shared locks.
A livelock also occurs when read transactions monopolize a table or page, forcing a write transaction to wait indefinitely.

Categories: Database, SQL Server
  1. February 22, 2007 at 8:10 am


  2. Victor
    April 6, 2007 at 9:07 am

    I have get a deadlock while trying to run some stored procs at the same time at a several coonections to DB.

    Question. Can autoincrement field (Identity) make deadlock when inserting at the same time into 1 table?

  3. Rajesh
    April 22, 2008 at 7:16 pm

    Very Nice and Thanks for Information.

  1. July 8, 2012 at 9:28 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: