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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I know whether procedure is running or not ?

Re: How do I know whether procedure is running or not ?

From: MBPP <mpacheco_at_directnet.com.br>
Date: 17 Feb 2005 09:29:08 -0800
Message-ID: <1108661348.873808.222500@o13g2000cwo.googlegroups.com>


Yes but only the procedure which was initiated on the command line or call. Any procedure or function called inside won't be displayed. The query I use is:

select

   a2.sid,
   a2.serial#,
   a2.username,
   a2.process,
   a2.terminal,
   a1.sql_text

from

   v$open_cursor a1,
   v$session a2
where

   a2.sid = a1.sid and
   a2.sql_address = a1.address and
   a2.status = 'ACTIVE';

In this query look for:

sql_text like '%procedure%'

Note that the query is based on dynamic performance views so you need SELECT privilege on them. Maybe there are better ways to check if a stored procedure is running which of course someone will post or explain here. Received on Thu Feb 17 2005 - 11:29:08 CST

Original text of this message

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