What is a deadlock and what is a live lock? How will you go
about resolving deadlocks?
Answer Posted / kkkkkk
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 processDeak Lock is a situation when two or more process
continuous working and each having a lock on a particular
record but at a time only one can lock a particular and the
other one will go to dead lock.
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.A human example of live lock would be two people who meet
face-to-face in a corridor and each moves aside to let the
other pass, but they end up moving from side to side without
making any progress because they always move the same way at
the same time and never cross each other. This is good
example of live lock.
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
How to retrieve error messages using mssql_get_last_message()?
How do I find information about the install locations for the various instances running on a computer?
Can two tables have the same primary key?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
Tell about MOM Tool(Microsoft Operator Manager)?
Do you know what are acid properties?
What different steps will a sql server developer take to secure sql server?
What's new in sql management studio for sql server? : sql server management studio
What the different components of Replication and what is their use?
Explain the benefits of user-defined functions?
How to use subqueries in the from clause in ms sql server?
What is sql server profiler?
Is it possible to call a stored procedure within a stored procedure?
Explain the rules for designing files and file groups in sql server?
List out the differences between global and local temp tables in sql server?