Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: whoami
Here is one which gets processes, terminal, site id, and user.
BEGIN SELECT PROC.PID
,PROC.SPID
,PROC.TERMINAL
,SES.OSUSER
,SES.PROCESS
INTO l_pid
,l_spid
,l_terminal
,l_username
,l_sid
FROM V_$PROCESS PROC, V_$SESSION SES WHERE SES.AUDSID = TO_NUMBER(USERENV('SESSIONID')) AND SES.TERMINAL = USERENV('TERMINAL') AND PROC.ADDR = SES.PADDR ;
Dbas would not allow direct access to V_$ tables, They did create views for us to use.
Umar FArooq (umar.farooq_at_cressoft.com.pk) wrote: : is there a command (or column of a view/table) in oracle equivalent to : the 'whoami' unix command
: THx.
--
While DSC may claim ownership of all my ideas (on or off the job),
DSC does not claim any responsibility for them. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Fri May 22 1998 - 06:51:56 CDT
![]() |
![]() |