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
Delete duplicate rows without using rowid.
explain extended properties
What is difference between delete & truncate commands?
What is lock escalation and what is its purpose?
What is scrollable cursor?
What is logon trigger?
What is msdb database? : SQL Server Architecture
What is the purpose of floor function?
What happens if we shrink log file in sql server?
Tell me what is sql profiler?
What is the difference between lock, block and deadlock? : sql server database administration
What is a rownum?
If we delete pack Spec what will be the status of pack Body ?
What specific conditions database should meet, before you can bulk copy data into it using bcp?
What are pessimistic lock and optimistic lock?