By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,197 Members | 974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,197 IT Pros & Developers. It's quick & easy.

OS username?!

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
"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

P: n/a
"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.