oracle aide

August 31, 2007

Oracle locks cheat sheet

Filed under: 1z0-042, locks, oca — oracleaide @ 6:13 pm
SQL Statement Row
locks?
Mode
of
table lock
Lock Modes Permitted?
RS RX S SRX X
SELECT…FROM table…
INSERT INTO table RX
UPDATE table … RX
DELETE FROM table … RX
SELECT … FROM table FOR UPDATE OF … RS
LOCK TABLE table IN ROW SHARE MODE RS
LOCK TABLE table IN ROW EXCLUSIVE MODE RX
LOCK TABLE table IN SHARE MODE S
LOCK TABLE table IN
SHARE ROW EXCLUSIVE MODE
SRX
LOCK TABLE table IN EXCLUSIVE MODE X

  • RS: row share
  • RX: row exclusive
  • S: share
  • SRX: share row exclusive
  • X: exclusive
  •  a lock.

  •  A lock, if no conflicting row locks
    are held by another transaction.
    Otherwise, waits occur.

  • The source.

    Advertisements

    Create a free website or blog at WordPress.com.