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: V$session

RE: V$session

From: Koivu, Lisa <lkoivu_at_qode.com>
Date: Wed, 02 May 2001 09:02:43 -0700
Message-ID: <F001.002F7526.20010502082025@fatcity.com>

It's in v$process.  Here's a script that displays it that I got off this list a while ago

set linesize 2000
column logon_time format a17
column username format a16
column unix_pid format a8
column machine format a20
column client_Program format a20
set pagesize 200
select
        s.username,
        s.sid,
        s.serial#,
        to_char(p.spid) unix_pid,
        s.status,
        to_char(logon_time, 'mm/dd/yy hh24:mi:ss') logon_time,
        -- idle time
        -- days added to hours
        --( trunc(LAST_CALL_ET/86400) * 24 ) || ':'  ||
        -- days separately
        substr('0'||trunc(LAST_CALL_ET/86400),-2,2)  || ':'  ||
        -- hours
        substr('0'||trunc(mod(LAST_CALL_ET,86400)/3600),-2,2) || ':' ||
        -- minutes
        substr('0'||trunc(mod(mod(LAST_CALL_ET,86400),3600)/60),-2,2) || ':' ||
        --seconds
        substr('0'||mod(mod(mod(LAST_CALL_ET,86400),3600),60),-2,2)  idle_time,
        substr(s.program,1,20) client_program,
        s.machine,
        s.process client_process,
        s.osuser,
        substr(p.program,1,20) server_program
from v$session s, v$process p
where s.username is not null
        and p.addr = s.paddr

order by username, 2
/

 
 
 
 
 

Lisa Rutland Koivu
Oracle Database Administrator
Certified Self-Important Database Deity
Slayer of Unix Administrators
Wanton Kickboxing Goddess

lkoivu_at_qode.com
 
 NeoMedia
 

2201 Second St., Suite 600
Fort Myers, FL 33901, USA
Phone: 941-337-3434
Fax: 941-337-3668

www.neom.com <http://www.neom.com> 
www.paperclick.com <http://www.paperclick.com> 
www.qode.com <http://www.qode.com> 

 

P a p e r C l i c k . c o m <http://www.paperclick.com/home.htm>
 

 Enter Your PaperClick Code Here!
 
 

-----Original Message-----
From: Seema Singh [mailto:oracledbam_at_hotmail.com] Sent: Wednesday, May 02, 2001 12:01 PM
To: Multiple recipients of list ORACLE-L Subject: V$session

Hi
Which column in v$session indicate os process? Thanks
-seema



Get your FREE download of MSN Explorer at http://explorer.msn.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Seema Singh

  INET: oracledbam_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 Wed May 02 2001 - 11:02:43 CDT

Original text of this message

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