Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: who am I - need OSUSER from PL/SQL

Re: who am I - need OSUSER from PL/SQL

From: RyuO <RyuO_at_excite.com>
Date: Fri, 03 Dec 1999 17:00:37 GMT
Message-ID: <828svh$d91$1@nnrp1.deja.com>


Here are some other queries that may help somehow:

select	d.name		db_name

, p.program server_program
, s.sid
, s.process session_process_id
, s.type session_type
, s.schemaname
, s.osuser
, s.logon_time
, to_char(s.logon_time,'YYMMDD HH24:MI:SS') session_start
, round((sysdate-s.logon_time),2) session_days
, s.machine session_machine
, s.program session_program
, s.module session_module
, s.terminal session_terminal
from v$session s
, v$process p
, v$database d
where s.sid = (select distinct sid from v$mystat) and s.paddr = p.addr ; select addr
, pid
, spid
, username
, serial#
, terminal
, program
, background
from v$process ; select d.name database
, s.sid
, s.process
, s.type
, s.schemaname
, s.osuser
, to_char(s.logon_time,'YYMMDD HH24:MI') sess_start
, round((sysdate-s.logon_time),2) sess_days
, s.machine
, s.program
, s.module
, s.terminal
, s.schema#
from v$session s
, v$database d
where schemaname <> 'SYS' and type <> 'BACKGROUND' order by logon_time

;

In article <8267h5$977p$1_at_oceanite.cybercable.fr>,   "Michel Cadot" <micadot_at_netcourrier.com> wrote:

> select osuser from v$session where audsid=userenv('SESSIONID');
>
> --
> Have a nice day
> Michel
>
> <ccyr6798_at_my-deja.com> a écrit dans le message :
8263st$d38$1_at_nnrp1.deja.com...
> > I need to get the OSUSer name from a non-priv'd oracle user running a
> > stored procedure or kicking a trigger.
> >
> > I have no problem granting select/creating public synonyms on
> > v$session/v$process but still can't figure out which user in the
list I
> > am. I don't want to turn on auditing just to populate the user_audit
> > tables, which also contain the osuser name.
> >
> > any thoughts?
> >
> > thanks,
> > Cary
> >
> >
> >
> > Sent via Deja.com http://www.deja.com/

> > Before you buy.
>
>


Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Dec 03 1999 - 11:00:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US