Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to get serial# of current session or OS user_name
"Blaze" <b_kwiatkowski_at_poczta.onet.pl> wrote in message
news:a9v4m4$jj0$1_at_news.tpi.pl...
> Hi!
> I'm trying to get a serial# or OS user name of current session.
> Thanks in advance for help
> Blaze
>
>
And no version of course, and this answer like many others is
version-dependent.
For 8i and upwards, check the sys_context function in your SQL language
reference manual
For all versions (with the restriction that users with SYSDBA privilege all
have audsid 0)
select sid, serial#, osuser
from v$session
where audsid = userenv('sessionid')
Hth
-- Sybrand Bakker Senior Oracle DBA to reply remove '-verwijderdit' from my e-mail addressReceived on Sun Apr 21 2002 - 15:04:34 CDT
![]() |
![]() |