This discussion is archived
3 Replies Latest reply: Jan 6, 2009 5:51 AM by Antilles RSS

Tracing APEX SQL

Antilles Newbie
Currently Being Moderated
I'm having a problem with a bit of complex SQL in an Apex region.

I've been pasting bits of SQL into SQL Developer to debug the statements but this is a bit tedious when there are a lot of parameters to manually put in.

Is there a quick way to see the actual SQL statements that Apex is sending to the database (a trace or something)?
  • 1. Re: Tracing APEX SQL
    Antilles Newbie
    Currently Being Moderated
    I mananged to turn on sql_trace for the whole database by using:

    ALTER SYSTEM SET sql_trace = true SCOPE=MEMORY;

    Then checked the UDUMP directory for the resulting trace files. But statements executed by Apex don't seem to show up in the trace files, only statements executed in SQL Plus or SQL Developer.

    Any ideas?
  • 2. Re: Tracing APEX SQL
    438381 Guru
    Currently Being Moderated
    Antilles:

    If your APEX installation uses the Embedded pl/sql gateway,the trace files will be in the 'bdump' directory. The file names will have the string pattern 's00' within them.

    Varad
  • 3. Re: Tracing APEX SQL
    Antilles Newbie
    Currently Being Moderated
    Hi Varad

    I've found the trace files in udump but as I say there is no sign of any of the SQL Apex is running in page regions.

    The files show SQL statements I run through SQL Plus and SQL Developer only.

    I also tried adding &p_trace=YES to the end of my URLs but still no sign of any APEX SQL in the trace files.

    Edit - I'm looking in the wrong directory. As you say they're in bdump - I'm looking in udump.
    Thank you I've found them now.

    Edited by: Antilles on Jan 6, 2009 5:50 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points