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

Home -> Community -> Usenet -> c.d.o.server -> Re: Audit with triggers

Re: Audit with triggers

From: <milagre_at_softdes.com.br>
Date: Tue, 21 Sep 1999 02:47:31 GMT
Message-ID: <7s6rk1$gqc$1@nnrp1.deja.com>


The correct select that you need is:

select osuser from sys.v_$session where audsid = userenv('sessionid')

Explain:
USERENV is a function thar return some informations about your session environment, depends of a string parameter, in this case, 'sessionid' return the audit id for the session and you can join it with the column audsid in the v$session.

bye

--
Geraldo Milagre
Oracle DBA and Instructor
milagre_at_softdes.com.br

In article <7s5i6d$h71$1_at_pheidippides.axion.bt.co.uk>,   "Neil C" <btsscrth_at_bt.com> wrote:
> Hi,
>
> yes you can use select osuser from v$session, of course, depending on
the
> user running / owning the triggers, you may have to grant select on
> v_$session table.
>
> HTH
>
> NeilC
>
> Frederic DEBRUS wrote in message

<01bf0377$384b1720$3e35a99e_at_gal159a>...
> >Hi there,
> >
> > I'm trying to make some audit using triggers,
> >populating a "manipulation table" recording who made what with
> >the values of the column before and after it's working fine but I
would
> >like
> >to kwown the osuser and record it. How can I access this information
from
> >my trigger (select osuser from sys.v_$session where ?????)
> >
> >thanks
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Sep 20 1999 - 21:47:31 CDT

Original text of this message

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