1Z0-062 · Question #373
An employee salary in the non-partitioned EMPLOYEES table, has been updated but the transaction is uncommitted. Which two types of lock are held by the transaction? (Choose two.)
The correct answer is A. a row level lock on the row being updated C. a row shared lock on the EMPLOYEES table. When a row is updated in an Oracle table and the transaction is uncommitted, the database holds an exclusive lock on that specific row and a row shared lock on the entire table.
Question
An employee salary in the non-partitioned EMPLOYEES table, has been updated but the transaction is uncommitted. Which two types of lock are held by the transaction? (Choose two.)
Options
- Aa row level lock on the row being updated
- Ba null lock on the row being updated
- Ca row shared lock on the EMPLOYEES table
- Dan exclusive lock on the EMPLOYEES table
- Ea null lock on the EMPLOYEES table
How the community answered
(50 responses)- A70% (35)
- B8% (4)
- D4% (2)
- E18% (9)
Why each option
When a row is updated in an Oracle table and the transaction is uncommitted, the database holds an exclusive lock on that specific row and a row shared lock on the entire table.
When a row is updated, an exclusive row-level lock (TX lock) is placed on that specific row to prevent other transactions from modifying it until the current transaction commits or rolls back.
A null lock provides no restrictions and is not held on the row being updated by an active modification transaction.
An `UPDATE` operation implicitly acquires a Row Share (RS) lock on the table, which allows concurrent DML operations but prevents conflicting DDL operations that would change the table structure.
An exclusive lock on the table (`EXCLUSIVE` lock) prevents all other DML and DDL operations, which is too restrictive for a standard row-level `UPDATE` operation.
A null lock provides no restrictions and is not held on the table by an active modification transaction.
Concept tested: Oracle Transaction Locks (Row and Table)
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/adgrm/oracle-database-concurrency-and-locking.html#GUID-D20F205B-D350-4826-8D63-B8497C198A00
Topics
Community Discussion
No community discussion yet for this question.