I like this version posted here, not my doing.
Can't vouch for v7 validity, however:

 set lines 600
 set linesize 500
 set verif off
 col username for a15
 col osuser for a15
 col terminal for a8
 col program for a32
 col machine for a15
 col type for a4 trunc
 col logon_time hea 'LOGON-START-TIME' for a20
 col module for a10
 col sid for 999
 col serial# for 999999
select a.username, a.osuser,
         --a.terminal,
         a.machine, a.program,
        type, to_char(a.logon_time,'DD-MON-YYYY HH24:MI:SS') logon_time,
        substr(a.module,1,10)
 module, a.sid, a.serial#
   from v$session a, sys.audit_actions b
  where -- a.status = 'ACTIVE' and
 b.action = a.command
 order by a.username
col username form a12
col osuser   form a12
col machine  form a15
col sid      form 9999
select vs.username,
       vs.sid,
       vs.serial#,
       vs.osuser,
       vs.machine,
       vs.process,
       vp.spid
from v$session vs, v$process vp
where vs.paddr = vp.addr;



On Fri, Apr 04, 2003 at 03:19:24PM -0800, Sam Bootsma wrote:
> Oracle 7.3.4 running on AIX 4.3.3
> 
>  
> 
> The ps command on our AIX box shows a UNIX process taking 50% of the
> CPU.  The PID is 89510.  When I try to find the corresponding session on
> the Oracle database it returns no rows.  Is there a way I can map the
> given PID on UNIX to a session id on Oracle?  See below for the query I
> ran.
> 
>  
> 
> SQL> l
> 
>   1  select sid from v$session
> 
>   2* where process like '%89510%'
> 
> SQL> /
> 
>  
> 
> no rows selected
> 
>  
> 
> Thanks for your information!
> 
>  
> 
>  
> 
>  
> 
> Sam
> 
> [EMAIL PROTECTED]
> 
>  
> 

-- 
===============================================================
Ray Stell   [EMAIL PROTECTED]     (540) 231-4109     KE4TJC    28^D
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ray Stell
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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