how to print out sql query that will be sent to oracle
I would like to verify that the sql query I'm sending to Oracle is the one I actually want. I was wondering how do I do that? I can print out the statement before I bind the variables, ie. I get this from the console:
UPDATE MY_TABLE=tableName SET COL1=?, COL2=?, COL3=? WHERE PK=?开发者_运维技巧
But I would like to see the actual statement after I have set the variables to the values.
Try using log4jdbc
By using this you can also see the bind parameters etc along with the sql output.
A better tool may be p6spy.
精彩评论