What is deadlock and how to avoid the deadlocks.

Answer Posted / dba

P1 has lock on R1
P2 has lock on R2
P1 requests lock on R2
P2 Requests lock on R1

Where P & R are corresponding processes and resources.

Deadlock consists of two processes requesting locks on
resources thus, blocking each other.

You can avoid Deadlocks:
Access objects in the same order
Use lower isolation levels
Keep Transactions short and in one batch
Avoid user interactions in transaction
Use bound connections

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is order of B+tree?

853


How except clause is differs from not in clause?

700


What is the difference between dbcc indexdefrag and dbcc reindex?

705


What are audit control procedures?

748


What are the differences between local and global temporary tables?

750






what are the important architecture components of SSRS?

112


What is a trace frag?

822


Define model database?

741


How to grant a permission in ms sql server using "grant execute" statements?

757


What is table join?

763


Explain the working of sql privileges?

796


How to get the number of affected rows?

734


What are synonyms?

710


Which command is used for user defined error messages?

737


What is standby servers? Explain types of standby servers.

671