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

Delete duplicate rows without using rowid.

1070


explain extended properties

560


What is difference between delete & truncate commands?

546


What is lock escalation and what is its purpose?

555


What is scrollable cursor?

541






What is logon trigger?

546


What is msdb database? : SQL Server Architecture

536


What is the purpose of floor function?

539


What happens if we shrink log file in sql server?

517


Tell me what is sql profiler?

619


What is the difference between lock, block and deadlock? : sql server database administration

564


What is a rownum?

501


If we delete pack Spec what will be the status of pack Body ?

966


What specific conditions database should meet, before you can bulk copy data into it using bcp?

536


What are pessimistic lock and optimistic lock?

546