Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Audit with triggers
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
![]() |
![]() |