PrepAway - Latest Free Exam Questions & Answers

What will happen?

Application A is designed to execute the following SQL statements within a single Unit of Work
(UOW).
UPDATE employee SET salary = salary * 1.1 WHERE empno=’000010′
UPDATE department SET deptname = ‘NEW dept’ WHERE deptno=’A00′
Application B is designed to execute the following SQL statements within a single Unit of Work
(UOW).
UPDATE department SET deptname = ‘OLD DEPT’ WHERE deptno=’A00′
UPDATE employee SET salary = salary * 0.5 WHERE empno=’000010′
Application A and application B execute their first SQL statement at the same time. When
application A and application B try to execute their second SQL statement, a deadlock occurs.
What will happen?

PrepAway - Latest Free Exam Questions & Answers

A.
The database managerwill rollback the transaction in both applications.

B.
The database managerwill rollback the transaction in one of the two applications.

C.
Application B will successfully update the EMPLOYEE and DEPARTMENT tables; Application
A will be placed in a lock wait state.

D.
Application A will successfully update the EMPLOYEE and DEPARTMENT tables; Application
B will terminate when the lock timeout value is reached.

One Comment on “What will happen?


Leave a Reply