I am trying to show (print in console) the SQL queries corresponding to the ADF-BC’s one. I don’t know how to do this with Jdeveloper 11.1.1.1.0 and Oracle 11g. I just want to see what SQL queries are going to be executed before sending them to Oracle. The problem is I am working on an existing web application (written in ADF-BC) and the response time is too high. So I’d like to test the query with SQL Developer and make some ‘Explain plan’ to see how I can optimize it.
Or, if someone knows how to get a SQL query string (in debug mode) from the executeQueryForCollection(Object qc, Object[] params, int noUserParams)
method?
Run the app with the Java runtime option
-Djbo.debugoutput=console
This will print the info in the log window. It with I’ll print very much information so you should turn it off quickly.
To get the same info in a file use
-Djbo.debugoutput=file
This will print the info into a file and only the file name is written to the log.