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: I want to monitor all sql executed

Re: I want to monitor all sql executed

From: Matthias Hoys <idmwarpzone_NOSPAM__at_yahoo.com>
Date: Sat, 19 Nov 2005 16:43:43 +0100
Message-ID: <437f4830$0$8923$ba620e4c@news.skynet.be>

"Jackson" <Jackson_at_dddd.com> wrote in message news:Rc6ff.202491$ir4.28073_at_edtnps90...
> What is the tool to monitor all sql executed say last a couple of hours?
> I have looked at TopSQL but this doesn't produce what i wanted.
>
> Thanks in advance.
>
>

Use an after logon trigger (installed with schema SYS) and enable/disable this trigger whenever you want to trace sessions. Warning : this could generate a large amount of trace files !

Example :

create or replace trigger trace_sessions after logon on database
begin

     execute immediate 'alter session set sql_trace=true'; end;
/

alter trigger trace_sessions enable/disable;

HTH
Matthias Received on Sat Nov 19 2005 - 09:43:43 CST

Original text of this message

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