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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to identify spid of caller

Re: How to identify spid of caller

From: Komix Hui <huikomix_at_dt.com.hk>
Date: 1997/02/13
Message-ID: <330351C5.26D1@dt.com.hk>#1/1

Manoj Appully wrote:
>
> Bill Wine wrote:
>
> If I am logged into the database more than once, with the same
> username, terminal, program, and I do this query:
>
> select * from v$session where username = user
>
> how would I find which row corresponds to the current, or calling
> process? This would be from a PL/SQL procedure.
 

> Try this :
>
> select * from v$session where userenv('schemaid') = schema#;

'schemaid' cannot distingush two sessions with same username. But Auditing session
id can be used for this purpose:

select * from v$session

   where userenv('sessionid')=audsid;

-- 
Hui, Kwok Miu (Xu, Guo Miao)         E-Mail: huikomix_at_dt.com.hk
Assistant MIS Manager                Tel   : (00852)2589 3369
Cho Yang (Hong Kong) Co., Ltd.       Fax   : (00852)2559 3049
Received on Thu Feb 13 1997 - 00:00:00 CST

Original text of this message

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