What should you do?

You are designing a data access layer (DAL) for an application. Conflicts are occurring in the SQL Server database due to concurrent updates. You need to design a database locking strategy that meets the following requirements:
Resolves concurrent update conflicts without loss of data
Ensures that data conflicts can be resolved by users
Locks only the necessary data for updates
What should you do?
A. Use optimistic locking.
Terminate the update when a DB Concurrency Exception occurs
B. Use pessimistic locking.
Terminate the update when a DB Concurrency Exception occurs
C. Use pessimistic locking.
Retry the failing update operation in the DB Concurrency Exception handler until it succeeds.
D. Use optimistic locking.
In the DB Concurrency Exception handler, display the data of both original and updated records to the user. Allow the user to resolve the conflicts.

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.