wood burning stoves 2.0*
The moose likes Oracle/OAS and the fly likes How to trace SQL statements ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "How to trace SQL statements ?" Watch "How to trace SQL statements ?" New topic
Author

How to trace SQL statements ?

Horaci Macias
Ranch Hand

Joined: Nov 08, 2001
Posts: 74
I'm using EJB + Oracle8i, and I would like to trace all SQL statements made to Oracle, or all SQL statements made to a table in Oracle, to tune my code.
Anybody knows how can I do it ?
Thanks in advance,
Horaci Macias
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi Horaci,
Have you deployed the EJB in Oracle 8i DB?
If you are using Oracle JDeveloper as an IDE for deployment,this IDE provides you a feature to view SQL statements which is used by the EJB.I believe a similar fearure exists with the Oracle Application Server also.
In general, I suppose you need to look at tools provided by Container Vendors for tracing SQL statements.
Hope this helps,
Sandeep


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to trace SQL statements ?
 
Similar Threads
running sql in jsp
ORA-01008: not all variables bound
does OracleDriver really precompile a PreparedStatement?
some value too large for some column and getting a SQL trace from Oracle, a 30 year old database
Pooling Prepared Statements - Good Idea?