Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to identify spid of caller
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.
Thanks for your help.
Bill
Bill -
Try this :
select * from v$session where userenv('schemaid') = schema#;
Remember to join with v$process if you need the spid (the OS shadow process id )
Manoj Appully. Received on Fri Feb 07 1997 - 00:00:00 CST