Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Query to show db locks?
I'm looking for a query that will give me locks information including
schema and object information. This information is available in Oracle
Enterprise Manager (OEM) and is displayed relatively quickly...
I tried using the query below but it takes way too long (I'm not sure
why, it doesn't seem like it should).
Does anyone have a better query or know of the query that is used in OEM to generate this information?
Thanks
select b.sid,
c.username, c.osuser, c.terminal,
0, '--Waiting--', 1, 'Null', 2, 'Row Share', 3, 'Row Excl', 4, 'Share', 5, 'Sha Row Exc', 6, 'Exclusive',
0, ' ', 1, 'Null', 2, 'Row Share', 3, 'Row Excl', 4, 'Share', 5, 'Sha Row Exc', 6, 'Exclusive',
and b.sid = c.sid and c.username is not null and c.sid = &session_id