Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I know whether procedure is running or not ?
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
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