Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: getting a simple trace of sql statements executed

Re: getting a simple trace of sql statements executed

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 16 Jan 2007 07:46:45 -0800
Message-ID: <1168962403.114647@bubbleator.drizzle.com>


Mark Harrison wrote:
> I would like to get a trace of all the sql statements
> executed in my program. I don't want to coalesce the
> statements, such that the report tells me "select 2+2
> from dual" was executed 20 times for a total time
> of X seconds.
>
> Rather, I want to see a list of the statements in the
> order they were executed, so I can correlate them
> with my source program and ensure that my logic
> is being executed as I expected.
>
> Many TIA,
> Mark

What version?

The choices are many. Among them:

ALTER SESSION
ALTER SYSTEM

DBMS_MONITOR
DBMS_SUPPORT
DBMS_TRACE

TKPROF (for the resulting trace file)

And if you haven't run it ... I'd suggest DBMS_PROFILER too. ;-)

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Jan 16 2007 - 09:46:45 CST

Original text of this message

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