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 -> Re: [PL/SQL] Capturing instance/sesssion info?

Re: [PL/SQL] Capturing instance/sesssion info?

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Mon, 13 Jan 2003 15:55:46 GMT
Message-ID: <6kBU9.37201$No.4806@sccrnsc04>


user is the loged on user. Try it from sqlplus: select user from dual;
I think you can get it from application context. Go to asktom.oracle.com and do a search.
Jim

--
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Luch" <optimaljedi_at_hotmail.com> wrote in message
news:3d047c59.0301130717.72630ddf_at_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:55:46 CST

Original text of this message

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