OracleDB‎ > ‎

Locked Job

Oracle locked or long wait job

SELECT s.SID, USERNAME AS "User", PROGRAM, MODULE, ACTION, LOGON_TIME "Logon", l.* FROM V$SESSION s, V$ENQUEUE_LOCK l WHERE l.SID = s.SID AND l.TYPE = 'CF' AND l.ID1 = 0 AND l.ID2 = 2;


highWait.sql

SELECT o.object_name, o.object_type, a.event, SUM(a.wait_time + a.time_waited) total_wait_time FROM v$active_session_history a, dba_objects o WHERE a.sample_time between sysdate - 30/2880 and sysdate AND a.current_obj# = o.object_id GROUP BY o.object_name, o.object_type, a.event ORDER BY total_wait_time;

Comments