Sinardy,
This only tells you if an object exists not if it is running - or even if it is valid unless status is elected from dba_objects as well.
There was a thread around 30/10/01 with the appropriate title 'How can I tell if a procedure/package is running?' - I am not sure if it is the same thread that we are on now. The following quote came from a reply by Steve Adams
You can look at the mode in which the stored procedure or package is pinned in the library cache. This information is in
X$KGLOB.KGLHDPMD. A value of 2 indicates that the object is pinned in shared mode by one or more sessions. If necessary,
you can join to X$KGLPN to find the sessions holding the pins. See "executing_packages.sql" at
http://www.ixora.com.au/scripts/misc.htm#executing_packages for an example.
HTH
John
-----Original Message-----
From: Sinard Xing [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2002 08:40
To: Multiple recipients of list ORACLE-L
Subject: RE: Re: How can I tell if a procedure/package is running?
Hi,
You can do
Select object_name, object_type, status
from dba_objects
where object_type like '%PACK%' or
object_type like '%PROCE%'
order by 2,1;
Sinardy
-----Original Message-----
[EMAIL PROTECTED]
Sent: 22 January 2002 15:10
To: Multiple recipients of list ORACLE-L
Can anyone give me a good example on how this works?
Thanks in advance
Roland
Connor McDonald <[EMAIL PROTECTED]>@fatcity.com den 2001-10-25 01:45 PST
Sänd svar till [EMAIL PROTECTED]
Sänt av: [EMAIL PROTECTED]
Till: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Kopia:
I would say that the best way is in its coding
typically by adding calls to dbms_application_info -
which is great way of tying SQL to its owning PL/SQL
as well.
You might be lucky to catch it in sql_address in
v$session (depending on what its actually doing at the
time). Similarly, you could possibly glean some info
from V$SQL via USERS_EXECUTING
You could always try modify the proc which would
probably hang on library cache pin or similar - hardly
a recommended way of course :-)
hth
connor
--- Doug C <[EMAIL PROTECTED]> wrote: > How can I tell
if a stored procedure or package is
> in the middle of execution?
> (for lack of doing what it does).. I've heard of
> parse locks, is that a way?
>
> Thanks,
> D
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Doug C
> INET: [EMAIL PROTECTED]
>
> 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: [EMAIL PROTECTED] (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).
=====
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)
"Some days you're the pigeon, some days you're the statue"
____________________________________________________________
Nokia Game is on again.
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Sinard Xing
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).
=========================================================
This electronic message contains information from the mmO2 plc Group
which may be privileged or confidential. The information is intended to be
for the use of the individual(s) or entity named above. If you are not the
intended recipient be aware that any disclosure, copying, distribution or
use of the contents of this information is prohibited. If you have received
this electronic message in error, please notify us by telephone or email
(to the numbers or address above) immediately.
=========================================================