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
What is difference between equi join and natural join?
What is cursors? And what are the different types of cursor?
Explain how to use linked server?
How do I setup a local sql server database?
What are the main differences between #temp tables and @table variables and which one is preferred?
What is the difference between left and right outer join?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
What is Dependency Injection and provide example?
Explain the usage of floor function in sql server.
What is federation member?
What is function of ROLLUP ?
Where cross join is used?
What is scan table/view and seek table/view when its occurs? : sql server database administration
Can we join two tables without primary key?
How to get a list of columns using the "sys.columns" view in ms sql server?