Current sessions running stored code
                                                 Last update (2008-02-20 20:57:20)
                                                                                                                   Date added (2008-02-13 18:53:36)

Summary
The list of sessions that are currently executing stored code (procedures, functions, etc)
SELECT DECODE(o.kglobtyp, 7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE', 12, 'TRIGGER', 13, 'CLASS') "TYPE",
o.kglnaown "OWNER", o.kglnaobj "NAME", s.indx "SID", s.ksuseser "SERIAL",
v$session.USERNAME, STATUS, OSUSER, MACHINE, v$session.PROGRAM, MODULE, ACTION
FROM sys.x$kglob o, sys.x$kglpn p, sys.x$ksuse s, v$session
WHERE o.inst_id = USERENV('Instance')
AND p.inst_id = USERENV('Instance')
AND s.inst_id = USERENV('Instance')
AND o.kglhdpmd = 2
AND o.kglobtyp IN (7, 8, 9, 12, 13)
AND p.kglpnhdl = o.kglhdadr
AND s.addr = p.kglpnses
AND v$session.SID = s.indx
AND o.kglobtyp = 13 --(JAVA CLASS)
ORDER BY 1, 2, 3;
Reviews
Categories
Oracle DBA-> (147)
  Alertlog (3)
  Archivelog (5)
  Auditing (1)
  Backup - Recovery (19)
  Database files (6)
  Database options (2)
  DB links (2)
  Dependencies (1)
  Dictionary (2)
  Exp-Imp Datapump (6)
  Jobs (2)
  Mview (2)
  Networking (3)
  Objects (7)
  Parameters (2)
  Redologs (6)
  Roles - Grants (2)
  Rollback - Undo (8)
  Segments (3)
  Sequences (2)
  Sessions (14)
  SGA (14)
  Tables (10)
  Tablespaces (10)
  Temp (4)
  Toad (5)
  Transactions (1)
  Upgrade (2)
  Users (3)
Oracle APPS DBA-> (66)
Exadata (1)
Performance Tuning-> (59)
Oracle Real Cases (24)
Oracle Errors (23)
Oracle SQL tricks (32)
Oracle RAC (3)
Oracle Security (8)
Filters
Search