1Z0-062 · Question #200
The HR user updates the salary of one of the employees in the EMPLOYEES table, but does not commit the transaction. Which type of lock would this scenario lead to?
The correct answer is B. Row-exclusive lock on the row being updated. In Oracle, a DML operation such as UPDATE acquires a row-level exclusive lock on the specific row being modified, not the entire table.
Question
The HR user updates the salary of one of the employees in the EMPLOYEES table, but does not commit the transaction. Which type of lock would this scenario lead to?
Options
- AExclusive table-level lock on the EMPLOYEES table
- BRow-exclusive lock on the row being updated
- CNull lock on the EMPLOYEES table
- DNull lock on the row being updated
How the community answered
(34 responses)- A3% (1)
- B91% (31)
- D6% (2)
Why each option
In Oracle, a DML operation such as UPDATE acquires a row-level exclusive lock on the specific row being modified, not the entire table.
Oracle does not acquire an exclusive table-level lock for standard DML operations; table-level locks prevent all concurrent access and are contrary to Oracle's row-level locking architecture.
Oracle's concurrency model uses fine-grained row-level locking. When a user issues an UPDATE, Oracle acquires a TX (transaction) lock at the row level, specifically a row exclusive lock on the affected row. This allows other sessions to concurrently access other rows in the same table without blocking.
Null locks in Oracle's lock hierarchy represent no lock held and are used in distributed lock management context, not for active DML operations on a table.
A null lock indicates no resource is held at the row level; a row being actively updated by a transaction holds an exclusive row lock, not a null lock.
Concept tested: Oracle row-level locking during DML operations
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/cncpt/data-concurrency-and-consistency.html
Topics
Community Discussion
No community discussion yet for this question.