Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "ps -ef" in oracle
On 12 Oct 2004 10:37:20 -0700, ken_at_kendenny.com (Ken Denny) wrote:
>Sybrand Bakker <sybrandb_at_hccnet.nl> wrote in message news:<od9nm0db0mri9oqaamuebs0tpbb40j024k_at_4ax.com>...
>> On 12 Oct 2004 00:49:22 -0700, notruf_1102003_at_yahoo.de (Gerhard M)
>> wrote:
>>
>> >hi,
>> >
>> >i'm looking out for something like ps -ef within oracle.
>> >I need to know if a procedure, executed by an other user/on an other
>> >terminal, is still running.
>> >At unix i'll find currently active commands with ps -ef|grep XXX. Is
>> >there somthing equal within oracle?
>> >
>> >thx
>> >
>> >gerhard
>>
>> SELECT *
>> FROM
>> v$session
>> where type = 'USER'
>> and status = 'ACTIVE'
>
>That'll get you the active sessions but you still don't know if a
>particular procedure is running. All it will show is the program that
>initiated the session (sqlplus, TOAD, etc.) but nothing about what
>process they're running. AFAIK, there is no way to find out if a
>particular procedure is executing.
>
>Ken
Of course there is. Just use the dbms_application_info package in your procedure, the info you set will show in v$session.
-- Sybrand Bakker, Senior Oracle DBAReceived on Tue Oct 12 2004 - 16:46:53 CDT