469,610 Members | 2,007 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

OS username?!

Does the Oracle have any view with information about current sessions with
their OS username, so I can get it by SQL query?
Thanks!
Jul 19 '05 #1
2 5308
"Cile" <ci**@hi.htnet.hr> wrote in message news:<c7**********@ls219.htnet.hr>...
Does the Oracle have any view with information about current sessions with
their OS username, so I can get it by SQL query?
Thanks!


v$session

Sybrand Bakker
Senior Oracle DBA
Jul 19 '05 #2
"Cile" <ci**@hi.htnet.hr> wrote in message news:<c7**********@ls219.htnet.hr>...
Does the Oracle have any view with information about current sessions with
their OS username, so I can get it by SQL query?
Thanks!


set linesize 200
set pause off
col sid format 9999
col osuser format a12
col program format a30
col module format a40
col machine format a21
col terminal format a10
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
accept dbuser prompt "DB User Name: "
accept osuser prompt "OS User Name: "
select username,
DECODE(upper(username), upper(osuser), ' ', '*') X,
sid, serial#, status, osuser, program, module, process, SQL_ADDRESS,
logon_time, machine, terminal
from v$session
where username like upper('%&dbuser%')
and osuser like lower('%&osuser%')
order by username
/

PS - stinking stupid browser ... I hope this isn't a double post ... *sigh*
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Ghazan Haider | last post: by
14 posts views Thread by Brent Burkart | last post: by
reply views Thread by Sid DeLuca | last post: by
nathj
4 posts views Thread by nathj | last post: by
24 posts views Thread by runway27 | last post: by
2 posts views Thread by shapper | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.