Interview Questions  

Go Back   Interview Questions > Interview Questions & Answers > Information Technology > Databases > DB Administration

DB Administration DB Administration Interview Questions, Learn by sharing DB Administration Interview Questions asked in various Companies, Get Career advices, Interview Procedures from DB Administration experts, Post asked DB Administration Interview Questions and Answers.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-16-2008, 06:43 AM
Senior Member
 
Join Date: Mar 2008
Posts: 4,634
Default What is a deadlock and what is a live

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?
Reply With Quote
  #2 (permalink)  
Old 07-07-2008, 12:54 PM
Junior Member
 
Join Date: Jul 2008
Posts: 5
Default

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.

Check out SET DEADLOCK_PRIORITY and "Minimizing Deadlocks" in SQL Server books online
Reply With Quote
Reply

Tags
db administration, interview questions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On