3 Replies Latest reply on Jan 6, 2009 1:51 PM by Antilles

    Tracing APEX SQL

      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
          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

            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.

            • 3. Re: Tracing APEX SQL
              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