SQL Server Locks - Answers to SQL Server Locks Interview Questions

Types of concurrency problem:- Lost or buried updates: - When the same row is selected for updates by two or more transactions and updates the row based on the value originally selected.........
Optimistic concurrency: - Assumes that a resource is likely to be available at all times. This means that resource locking is very unlikely......
Lost updates results in loss of data. It is a write operation. Uncommitted dependency reads data that has not been committed yet........
Isolation levels:- READ UNCOMMITTED: - Reads data that has been modified but not committed yet........
Guidelines to minimize deadlocks:- Avoid user interaction in the transactions. The transaction must not rely on any inputs from the user........
SQL server has a locking mechanism which locks the resources to be used by transactions.........
Shared (S): Mostly used for Read only operations like SELECT statements. It allows concurrent transactions to read data........
Lock escalation is when the system combines multiple locks into a higher level one........
A live lock is similar to a deadlock that the states of the processes involved in the live lock........