This script reports on all ACTIVE and KILLED sessions currently retaining a connection to the database instance. Very useful script for determining which user sessions are currently ACTIVE or have not resolved in KILLED state.
Original Description:
Original Title
Very useful script for determining which user sessions are currently ACTIVE
This script reports on all ACTIVE and KILLED sessions currently retaining a connection to the database instance. Very useful script for determining which user sessions are currently ACTIVE or have not resolved in KILLED state.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online from Scribd
This script reports on all ACTIVE and KILLED sessions currently retaining a connection to the database instance. Very useful script for determining which user sessions are currently ACTIVE or have not resolved in KILLED state.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online from Scribd
This script reports on all ACTIVE & KILLED sessions currently retaining
a connection to the database instance. Very useful script for determining
which user sessions are currently ACTIVE or have not resolved in KILLED state
set lines 132
spool currun.lis SELECT substr(SID,1,5) SID, substr(V$SESSION.USERNAME,1,15) USERNAME, SQL_TEXT, SUBSTR(OSUSER,1,8) OSUSER, STATUS FROM V$SESSION, V$PROCESS, V$SQLTEXT WHERE V$SESSION.PADDR = V$PROCESS.ADDR AND V$SESSION.SQL_HASH_VALUE=V$SQLTEXT.HASH_VALUE AND V$SESSION.SQL_ADDRESS=V$SQLTEXT.ADDRESS AND TYPE = 'USER' AND V$SESSION.USERNAME Is Not NULL AND STATUS IN('ACTIVE','KILLED') ORDER BY sid, piece;