Thanks for the script.  It is useful for me.

David

-----Original Message-----
Sent: Thursday, April 11, 2002 12:09 PM
To: Multiple recipients of list ORACLE-L


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: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nguyen, David M
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to