SQL Server Locks Question:
Download Job Interview Questions and Answers PDF
Explain optimistic and pessimistic concurrency?
![MS SQL Server Locks Interview Answer MS SQL Server Locks Interview Question](https://globalguideline.com/public/images/interview/4.png)
Answer:
Optimistic concurrency: - Assumes that a resource is likely to be available at all times. This means that resource locking is very unlikely. If a conflict occurs, the application must read the data and attempt the change again.
Pessimistic concurrency : - this locks the resources as and when required. A transaction can be assured to be completed unless a deadlock occurs
Pessimistic concurrency : - this locks the resources as and when required. A transaction can be assured to be completed unless a deadlock occurs
Download MS SQL Server Locks Interview Questions And Answers
PDF