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

Home -> Community -> Usenet -> c.d.o.misc -> [PL/SQL] Capturing instance/sesssion info?

[PL/SQL] Capturing instance/sesssion info?

From: Luch <optimaljedi_at_hotmail.com>
Date: 13 Jan 2003 07:17:46 -0800
Message-ID: <3d047c59.0301130717.72630ddf@posting.google.com>


Is there an easy way to access session info from PL/SQL. For instance... I'd like to have a delete trigger on a table where I can get the record deleted (this I know) plus info on the user/session that did it (so I can insert it into another table). This is the kind of info I'd like, I'm hoping there's an easier way to get it:

select s.sid, s.status, s.username, RTRIM(s.osuser), b.spid, s.machine, s.program, s.resource_consumer_group, r.timeout from v$session s, v$session_longops l, v$process b, dba_resumable r where (s.sid = l.sid(+)) and

        (s.sid = r.session_id(+)) and s.paddr=b.addr group by r.session_id, r.error_number, r.status, s.sid,

         s.status, s.username, s.osuser, b.spid, s.machine, s.program,s.resource_consumer_group, r.timeout ; Received on Mon Jan 13 2003 - 09:17:46 CST

Original text of this message

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