Database Tuning (MOSC)

MOSC Banner

Exactly What is 'Enq: Tx - Row Lock Contention'?

edited Feb 26, 2015 12:01PM in Database Tuning (MOSC) 3 comments

So what is  'Enq: Tx - Row Lock Contention'?
Here is an example testcase showing this wait.

First, create the table and insert some rows:

DROP TABLE tx_eg;

CREATE TABLE test( num number, txt varchar2(10), gender varchar2(10) ) INITRANS 1 MAXTRANS 1;

INSERT into tx_eg VALUES ( 1, 'First','FEMALE' );

INSERT into tx_eg VALUES ( 2, 'Second','MALE' );

INSERT into tx_eg VALUES ( 3, 'Third','MALE' );

INSERT into tx_eg VALUES ( 4, 'Fourth','MALE' );

INSERT into tx_eg VALUES ( 5, 'Fifth','MALE' );

COMMIT;

Now update from two sessions without committing or rolling back:

--Ses#1:

UPDATE tx_eg SET txt='Garbage' WHERE num=1;

--Ses#2:

UPDATE tx_eg SET txt='Garbage' WHERE num=1;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center