"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*