kofa wrote:
we're new to DB2 (using Express-C on Windows). We'd like to monitor the
SQL that Hibernate (a Java ORM) generates, along with query params.
To answer my own question: the JDBC driver can be set to trace
commands.
http://www-128.ibm.com/developerwork...m-0506fechner/
<blush>Sorry for the noise</blush>
Kofa
Still not good enough.
Here's an excerpt from the log:
[ibm][db2][jcc][Time:1155024677451][Thread:main][Connection@c9d92c]
prepareStatement (select productimp_.id, productimp_.active as
active6_, productimp_.code as code6_, productimp_.description as
descript4_6_, productimp_.stock as stock6_, productimp_.adHocPrice as
adHocPrice6_, productimp_.costPrice as costPrice6_,
productimp_.category as category6_, productimp_.supplier as supplier6_,
productimp_.type as type6_ from Product productimp_ where
productimp_.id=?) called
[ibm][db2][jcc][Time:1155024677451][Thread:main][Connection@c9d92c]
prepareStatement () returned PreparedStatement@106dc2d
[ibm][db2][jcc][Time:1155024677451][Thread:main][PreparedStatement@106dc2d]
setLong (1, 522) called
[ibm][db2][jcc][Time:1155024677451][Thread:main][PreparedStatement@106dc2d]
executeQuery () called
Not very easy to read (params shown on a separate line, in an even more
verbose fashion than we could get directly from Hibernate). The same
thing with MySQL:
Query select productimp_.id, productimp_.active as active6_,
productimp_.code as code6_, productimp_.description as descript4_6_,
productimp_.stock as stock6_, productimp_.adHocPrice as adHocPrice6_,
productimp_.costPrice as costPrice6_, productimp_.category as
category6_, productimp_.supplier as supplier6_, productimp_.type as
type6_ from Product productimp_ where productimp_.id=522
Any ideas (without costly third-party tools)?
TIA,
Kofa