You need to design a database locking strategy that meets the following requirements:

You are designing the data access layer (DAL) for an application that uses Microsoft SQL
Server 2008, Microsoft ADO.NET, and Microsoft Visual Studio 2010. 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 data necessary for updates What should you do?

You are designing the data access layer (DAL) for an application that uses Microsoft SQL
Server 2008, Microsoft ADO.NET, and Microsoft Visual Studio 2010. 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 data necessary for updates What should you do?

A.
Use optimistic locking. In the DBConcurrencyException exception handler, display the
data of both original and updated records to the user. Allow the user to resolve the conflicts.

B.
Use optimistic locking. Terminate the update when a DBConcurrencyException occurs.

C.
Use pessimistic locking. Terminate the update when a DBConcurrencyException occurs.

D.
Use pessimistic locking. Retry the failing update operation in the
DBConcurrencyException exception handler until it succeeds.



Leave a Reply 0

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