col object_name for a30
col program for a30
col process for a10
col action for a35
set lines 200 pages 300
select p.spid, s.action,s.process, lo.locked_mode , sid, s.serial#, s.LAST_CALL_ET/60, do.object_name,s.status
from V$session s, V$process p, V$locked_object lo, dba_objects do
where
s.paddr = p.addr
and s.sid=lo.session_id
and lo.object_id = do.object_id
and do.object_name in ('OE_ORDER_LINES_ALL','OE_ORDER_HEADERS_ALL')
and s.LAST_CALL_ET/60 >15
SELECT b.session_id AS sid,
NVL(b.oracle_username, '(oracle)') AS username,
a.owner AS object_owner,
a.object_name,
Decode(b.locked_mode, 0, 'None',
1, 'Null (NULL)',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share (S)',
5, 'S/Row-X (SSX)',
6, 'Exclusive (X)',
b.locked_mode) locked_mode,
b.os_user_name
FROM dba_objects a,
v$locked_object b
WHERE a.object_id = b.object_id
and a.object_name = 'WSH_NEW_DELIVERIES'
ORDER BY 1, 2, 3, 4;
No comments:
Post a Comment