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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Currently log-in users

Re: Currently log-in users

From: Mohammad Rafiq <rafiq9857_at_HOTMAIL.COM>
Date: Thu, 11 Apr 2002 09:09:10 -0800
Message-ID: <F001.004420B7.20020411090910@fatcity.com>


Try either of 1 script and make changes according to your requirement:

1)
col LOGIN_TIME format a12
COL OSUSER FORMAT A7
COL ORACLE_USER FORMAT A8
COL PROGRAM FORMAT A25
COL PROCESS_NR FORMAT A8
col uur format A5
select to_char(a.logon_time,'DD/MM HH24:MI') LOGIN_TIME, to_char(round(c.seconds_in_wait/3600,0))||'.'|| to_char(round(mod(c.seconds_in_wait,3600)/60,0)) HOUR,

a.osuser OS_USER,
a.username ORACLE_USER,
b.program PROGRAM,
b.spid PROCESS_NR,
a.sid SID,
a.serial# SERIAL#

from v$session a,
v$process b,
v$session_wait c
where a.paddr=b.addr
and a.sid=c.sid
/

2-

set linesize 120
select
SADDR,
SID,
SERIAL#,
PADDR,
substr(USERNAME,1,8) "USER",
STATUS STATUS_,
SCHEMA#,
OSUSER,
PROCESS,
LOGON_TIME,
LAST_CALL_ET
from v$session
order by osuser
/

Regards
Rafiq

Reply-To: ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Date: Thu, 11 Apr 2002 07:53:26 -0800

How do I check who is currently logging into database, where he is accessing from and what he is doing?

Thanks,
David

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Nguyen, David M
   INET: david.m.nguyen_at_xo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




MOHAMMAD RAFIQ


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mohammad Rafiq
  INET: rafiq9857_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Apr 11 2002 - 12:09:10 CDT

Original text of this message

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