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

    Leave a Comment »

    No comments yet.

    RSS feed for comments on this post. TrackBack URI

    Leave a Reply

    Please log in using one of these methods to post your comment:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    Create a free website or blog at WordPress.com.

    %d bloggers like this: