Re: How do I get my session ID
From: N Prabhakar <N_Prabhakar_at_Socgen-Crosby.com>
Date: 1996/11/22
Message-ID: <572scp$21e_at_newton.pacific.net.sg>#1/1
Date: 1996/11/22
Message-ID: <572scp$21e_at_newton.pacific.net.sg>#1/1
Fred Blindheim <fredb_at_tomax.com> writes: > I can type the following:
>
> SELECT osuser, sid
> FROM v$session
>
> and get a list of all the current Oracle users and their session id.
> But, how to can I return just MY session id. Can Oracle tell me what my
> osuser is so I can stick it in the where clause? Or, is there another
> way to do this?
Hi there,
Use the following statement to retrive your session id.
select userenv('sessionid') from dual;
From the above session you can retrieve your unix process id, by querying against V$PROCESS.
Regards
N.Prabhakar Received on Fri Nov 22 1996 - 00:00:00 CET