oracle check table lock

Solutions on MaxInterview for oracle check table lock by the best coders in the world

showing results for - "oracle check table lock"
Melinda
31 Feb 2019
1select t2.username, t2.sid, t2.serial#, t3.object_name, t2.OSUSER, t2.MACHINE, t2.PROGRAM, t2.COMMAND, t2.LAST_CALL_ET
2 from v$locked_object t1, v$session t2, dba_objects t3
3 where t1.session_id = t2.sid and t1.object_id = t3.object_id
4  ORDER BY t2.logon_time;
Charlene
15 May 2016
1-- Oracle: Locked objects
2SELECT vs.USERNAME, vs.OSUSER, vh.SID LOCKING_SID, vs.STATUS STATUS,
3       vs.MODULE MODULE, vs.PROGRAM PROGRAM_HOLDING, jrh.JOB_NAME, vsw.USERNAME,
4       vsw.OSUSER, vw.SID WAITER_SID, vsw.PROGRAM PROGRAM_WAITING, jrw.JOB_NAME
5FROM V$LOCK vh,
6     V$LOCK vw,
7     V$SESSION vs,
8     V$SESSION vsw,
9     DBA_SCHEDULER_RUNNING_JOBS jrh,
10     DBA_SCHEDULER_RUNNING_JOBS jrw
11WHERE (vh.ID1,
12       vh.ID2) IN (
13          SELECT ID1, ID2
14          FROM V$LOCK
15          WHERE REQUEST = 0
16          INTERSECT
17          SELECT ID1, ID2
18          FROM V$LOCK
19          WHERE LMODE = 0
20      )
21  AND vh.ID1 = vw.ID1
22  AND vh.ID2 = vw.ID2
23  AND vh.REQUEST = 0
24  AND vw.LMODE = 0
25  AND vh.SID = vs.SID
26  AND vw.SID = vsw.SID
27  AND vh.SID = jrh.SESSION_ID (+)
28  AND vw.SID = jrw.SESSION_ID (+);