--To see if the instance has had locking problems since startup, execute the following SELECT:
SELECT * FROM v$sysstat WHERE class=4

--Maybe the session(s) that created these waits is still connected. If they are, you find them in V$SESSTAT
SELECT * FROM v$sesstat WHERE statistic# = 23 AND value > 0 ORDER BY SID

--If a session has been waiting for an enqueue, then a row in V$SYSTEM_EVENT is created.
SELECT * FROM v$system_event WHERE event = 'enq: TX - row lock contention'

--With the following SELECT you can see for how long time the connected sessions had to wait for an enqueue and how long the maximum wait time was:
SELECT COUNT( * ), SUM( time_waited ), MAX( max_wait ) FROM v$session_event WHERE event = 'enq: TX - row lock contention'

SELECT * FROM v$session_event WHERE event = 'enq: TX - row lock contention'

--Which session is the blocker and which sessions are waiting to get the lock?
SELECT SN.Username, M.Sid, M.Type, 
DECODE(M.Lmode, 0, 'None', 1, 'Null', 2, 'Row Share', 3, 'RowExcl.', 4, 'Share', 5, 'S/Row Excl.', 6, 'Exclusive', LTRIM(TO_CHAR(Lmode,'990'))) Lmode,
DECODE(M.Request, 0, 'None', 1, 'Null', 2, 'Row Share', 3, 'RowExcl.', 4, 'Share', 5, 'S/Row Excl.', 6, 'Exclusive',LTRIM(TO_CHAR(M.Request, '990'))) Request,
M.Id1, M.Id2 
FROM V$SESSION SN, V$LOCK M
WHERE (SN.Sid = M.Sid and M.Request ! = 0)
or (SN.Sid = M.Sid and M.Request = 0 and Lmode != 4 and (id1, id2)
in (select S.Id1, S.Id2 from V$LOCK S where Request != 0 and S.Id1 = M.Id1 and S.Id2 = M.Id2) ) 
order by Id1, Id2, M.Request 

SELECT sid, taddr, lockwait, status, sql_address, row_wait_obj# RW_OBJ#, row_wait_file# RW_FILE#, 
row_wait_block# RW_BLOCK#, row_wait_row# RW_ROW#,BLOCKING_INSTANCE BLINST,BLOCKING_SESSION BLSESS, EVENT
FROM v$session 
WHERE sid IN(439,998) 
ORDER BY sid;

SELECT * FROM V$TRANSACTION WHERE ADDR = '000000046266A738'

SELECT * FROM V$SQLTEXT WHERE ADDRESS = '00000003D6180130'

SELECT * FROM DBA_OBJECTS WHERE OBJECT_ID = 151423

SELECT * FROM T_PRUEBA_A1 WHERE rowid = DBMS_ROWID.ROWID_CREATE(1, 151423, 64, 232701, 0);

SELECT * FROM v$lock WHERE sid IN(439,998) ORDER BY sid, type;

SELECT sid, seq#, event, p1raw, p2raw, p3raw, state, wait_time WAIT, seconds_in_wait SECS
FROM v$session_wait 
WHERE sid IN(439,998) 
ORDER BY sid

SELECT S.SID,t.addr, t.xidusn USN, t.xidslot SLOT, t.xidsqn SQL, t.status,
t.start_time, t.used_ublk UBLK, t.used_urec UREC, t.log_io LOG,
t.phy_io PHY, t.cr_get, t.cr_change CR_CHA
FROM v$transaction t, v$session s 
WHERE s.sid IN(439,998) AND t.addr = s.taddr

SELECT s.sid, q.users_executing, q.sql_text 
FROM v$session s, v$sql q
WHERE s.sid IN(439,998) AND q.address = s.sql_address 
ORDER BY s.sid

SELECT sid, user_name, address, sql_text
FROM v$open_cursor 
WHERE sid IN(439,998) 
ORDER BY sid;
