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 are different backups available in sql server?
how many triggers you can have on a table? : Sql server database administration
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
What is a result set object returned by odbc_exec()?
If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?
what is normalization? : Sql server database administration
Explain the truncate command? : SQL Server Architecture
What are the difference between primary keys and foreign keys?
What sql server means?
How to create nested stored procedure?
Differentiate between SQL and ORACLE joins and write their syntax.
What is Command line parameters in PLSQL.?
in the physical file layout, where should the transaction log be stored in relation to the data file?
What is sql collation?
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration