Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Active sql

RE: Active sql

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Wed, 03 Jul 2002 10:13:39 -0800
Message-ID: <F001.0048F259.20020703101339@fatcity.com>


prompt **** Currently Executing Packages **** SELECT
  substr(DECODE(o.kglobtyp,
    7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE', 12, 'TRIGGER', 13, 'CLASS'),1,15) "TYPE",
  substr(o.kglnaown,1,30) "OWNER",
  substr(o.kglnaobj,1,30) "NAME",
  s.indx "SID",
  s.ksuseser "SERIAL"
FROM

  sys.X_$KGLOB  o,
  sys.X_$KGLPN  p,
  sys.X_$KSUSE  s

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

ORDER BY 1, 2, 3
/

Courtsy of Steve Adams.

Raj



Rajendra Jamadagni MIS, ESPN Inc. Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!

-----Original Message-----
Sent: Wednesday, July 03, 2002 11:39 AM
To: Multiple recipients of list ORACLE-L

Hi gurus,

Is there any way to know which SQL statement or procedure or package is running actually.

I checked in V$SQLTEXT, V$SQLAREA joined with V$SESSION and could get the statement, the user but this process had already finished, it was just in the SGA.

What I want to know is who is actually running something in the DB.

TIA Ramon E. Estevez
com.banilejas_at_codetel.net.do
809-565-3121


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni_at_espn.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Received on Wed Jul 03 2002 - 13:13:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US