What is a deadlock and what is a live lock? How will you go
about resolving deadlocks?

Answer Posted / swapna

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

Is This Answer Correct ?    87 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a SQL query to delete a table?

655


Can a table be created inside a trigger?

567


How to create a new table in a given schema?

658


Difference Between ORDER BY Clause and GROUP BY Clause in SQL?

634


Explain nested trigger in sql?

597






How do I find the size of a sql server database?

497


What is the full form of dql?

516


Give main differences between "Truncate" and "Delete".

582


explain the storage models of olap? : Sql server database administration

524


How does the report manager work in SSRS?

116


What is awe?

572


Explain what are the restrictions that views have to follow? : SQL Server Architecture

597


How do I find information about the install locations for the various instances running on a computer?

556


What is a result set object returned by odbc_exec()?

554


Are all views updatable ?

728