Which of the following is the best practice to reduce deadlock - ProProfs Discuss
Topics
Products
Follow Us:

Which of the following is the best practice to reduce deadlock situations?



A. Access resources in the same order whenever possible within transactions
B. Collect and verify input data from users before opening a transaction
C. Keep transactions long.
D. All of the above.
E. Only A and B.

This question is part of Microsoft SQL Server Quiz
Asked by Telliant, Last updated: May 26, 2020

+ Answer
Request

2 Answers

E. Stanley

E. Stanley, Technical writer, Indianapolis

Answered Feb 20, 2019

The correct answer is option A
A deadlock occurs when the first process is waiting on a resource held by the second process. Each process is stuck waiting for each other to release a resource. Unless one process is stopped, the lock remains.

Deadlock often occurs when several long running transaction execute concurrently. Therefore, avoid long transactions.

Deadlocks can also occur if the resources are not acquired in a well-defined order; therefore, it is best to access resources in the same order whenever possible within transactions.
Hope this helps.

 

John Smith

John Smith

Answered May 30, 2017

Access resources in the same order whenever possible within transactions
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.