Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Recording Logon and SQL
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).
-- "netnews.comcast.net" <jglickma_at_lynx.neu.edu> wrote in message news:N%JNa.16492$Ix2.8148_at_rwcrnsc54...Received on Sun Jul 06 2003 - 01:09:11 CDT
> Does anybody know of a way to track every user
> and SQL statement from the v$session and
> v$sqlarea without using auditing. Currently we are using
> a stored procedure that polls these tables but sometimes
> the pool is flushed allowing statements to slip in between the cracks.
> Looking for a better way of doing this.
>
>
>
>
>
![]() |
![]() |