Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to identify spid of caller
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 3049Received on Thu Feb 13 1997 - 00:00:00 CST