Scenario: Two transactions, T1 and T2, are simultaneously accessing the same row in a table in DB2.
- DB2 will abort T2 and allow T1 to proceed with the update.
- T1 and T2 will deadlock, causing one of the transactions to abort.
- T1 will be allowed to update the row while T2 waits for the shared lock.
- T1 will be blocked until T2 releases the shared lock.
In this scenario, DB2 will utilize the concurrency control mechanism to manage locks efficiently. When transaction T1 holds an exclusive lock on a row, transaction T2 requesting a shared lock will be blocked until T1 releases its lock. Therefore, T1 will be blocked until T2 releases the shared lock, which maintains data consistency and avoids the risk of concurrent updates.
Loading...
Related Quiz
- The compression dictionary in DB2 is used for ________.
- A DBA notices a decline in query performance in a DB2 database. What steps can they take using the Runstats and Reorg utilities to improve performance?
- Multi-dimensional clustering (MDC) in DB2 improves performance by organizing data in ________.
- Which type of subquery is executed once for each row returned by the outer query?
- How does DB2 enforce access control on database objects?