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: Capture an application's ad-hoc SQL like MS SQL Profiler

Re: Capture an application's ad-hoc SQL like MS SQL Profiler

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Mon, 18 Dec 2006 23:14:32 +0000
Message-ID: <458720D8.2070308@dial.pipex.com>


stefan.karaivanov_at_gmail.com wrote:
> I need to see ad-hoc SQL executed by an application whose source code I
> do not have. How can I run a trace which would give me a list of all
> SQL statements (SQL, stored procs, SQL statements inside the stored
> procs, triggers, SQL inside triggers, etc) with bound variable values
> where needed in the order they were executed? That is, I need the
> Oracle equivalent of an MS SQL Profiler trace.
>
> I have tried SQL_TRACE, DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION, and
> TKPROF but I am thinking there might be an easier way of doing this.
> It's been days of reading and trying to set this up. Isn't there a tool
> free or commercial that already does that?
>
> Also, with this DIY way, how can I limit the output of the TKPROF. I am
> not interested in statistics at all at the moment. All I need is the
> SQL text, the bound variable values if there are any, and the start
> time of execution.
>
> Thanks
>

sql_trace will do this. The output is a text file (or text files). They can of course grow large. The challenges though are similar to sql profiler files - except you get better info from them.

-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info/services
Received on Mon Dec 18 2006 - 17:14:32 CST

Original text of this message

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