Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Recording Logon and SQL
"Burton Peltier" <burttemp1REMOVE_THIS_at_bellsouth.net> wrote in message
news:LSONa.11231$z34.1596_at_fe04.atl2.webusenet.com...
> New triggers introduced in Oracle8i version (I think) would probably do
it.
>
> I know you can create an "after logon" trigger that could capture some
info,
> but I am not sure if possible to track every sql statement . I know in
> Oracle9i there were new capabilities to allow tracking other things.
>
> Anyway, look up command "create trigger" with options "After Logon on
> Database" for a start...
>
> Fyi... we use the logon/logoff triggers to capture session length, DB
user,
> OS user, ip address, program name, and client machine name.
>
> The logon trigger does the insert to a table and the logoff updates the
row
> with logoff date/time. We also move the records out of the table these 2
> triggers hit into another table, daily. The 2nd table has indexes and is
> queried for reporting . But, only the logon/logoff triggers touch the 1st
> table which has no indexes (didn't want to slow down logon/logoff
process).
>
> --
Why? Can you not just issue two words: AUDIT SESSION;
It comes in the box. Why do people insist on reinventing the wheel?
If OP wants to check other things, audit insert on my_table, etc.
Regards,
Paul
Received on Sun Jul 06 2003 - 12:11:57 CDT