|
| Re: How to turn on/enable sql logging |
 |
Fri, 11 Apr 2008 08:55:08 -070 |
Russ Burkert wrote:
> That did not work. There is nothing on the console or any of the logs that
is new concerning sql logging.
What didn't work?
> Added the specified properties to the driver using the console and modified
the
> commEnv script so wlspy.jar is included in the WEBLOGIC_CLASSPATH.
WebLogic was restarted.
>
> However, spy.log is created and at least I can now see some database
errors
> (ORA-xxxx) coming back from Oracle (which is very helpful). But, no actual
SQL in that log, either.
>
> Upon further scrutiny of spy.log, I can see this kind of stuff:
> PreparedStatement[35].setString(int parameterIndex, String x)
> parameterIndex = 39
> x = RN22
> OK
>
> All of our database transactions right now are inserts. I see how this
maps to the JPA
> objects, but it is quite grueling to have to figure out the index/offset of
each piece
> of data in the object and then cross-reference that to its DB table/column
equivalent.
> Is there any way to just see a simple INSERT statement somewhere?
There *has* to be INSERT statements in the spy log. They may well be done by
PreparedStatements,
which show their SQL once at the prepare, early in the log, and then re-executed
indefinitely.
Find the SQL for a given prepared statement so you can know what failed when the
XXXth execute()
returns a SQLException.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|