Answers for "oracle check table lock"

SQL
1

oracle check table lock

select t2.username, t2.sid, t2.serial#, t3.object_name, t2.OSUSER, t2.MACHINE, t2.PROGRAM, t2.COMMAND, t2.LAST_CALL_ET
 from v$locked_object t1, v$session t2, dba_objects t3
 where t1.session_id = t2.sid and t1.object_id = t3.object_id
  ORDER BY t2.logon_time;
Posted by: Guest on September-29-2021
3

how to check table lock in oracle sql developer

-- Oracle: Locked objects
SELECT vs.USERNAME, vs.OSUSER, vh.SID LOCKING_SID, vs.STATUS STATUS,
       vs.MODULE MODULE, vs.PROGRAM PROGRAM_HOLDING, jrh.JOB_NAME, vsw.USERNAME,
       vsw.OSUSER, vw.SID WAITER_SID, vsw.PROGRAM PROGRAM_WAITING, jrw.JOB_NAME
FROM V$LOCK vh,
     V$LOCK vw,
     V$SESSION vs,
     V$SESSION vsw,
     DBA_SCHEDULER_RUNNING_JOBS jrh,
     DBA_SCHEDULER_RUNNING_JOBS jrw
WHERE (vh.ID1,
       vh.ID2) IN (
          SELECT ID1, ID2
          FROM V$LOCK
          WHERE REQUEST = 0
          INTERSECT
          SELECT ID1, ID2
          FROM V$LOCK
          WHERE LMODE = 0
      )
  AND vh.ID1 = vw.ID1
  AND vh.ID2 = vw.ID2
  AND vh.REQUEST = 0
  AND vw.LMODE = 0
  AND vh.SID = vs.SID
  AND vw.SID = vsw.SID
  AND vh.SID = jrh.SESSION_ID (+)
  AND vw.SID = jrw.SESSION_ID (+);
Posted by: Guest on January-18-2021

Code answers related to "oracle check table lock"

Code answers related to "SQL"

Browse Popular Code Answers by Language