Actual parameter values ββbecome available (as far as I know) when the org.hibernate package logging level is set to DEBUG and with hibernate.show_sql a set of properties. Use JDBCAppender if you want the log output in the database itself.
Alternatively, you can look at the log4jdbc project , which states the following:
In the registered release for prepared statements, binding arguments are automatically inserted into the SQL output. This greatly improves readability and debugging for many cases.
If this does not work, you can find out if P6Spy can in your situation . On WebLogic Server, equivalent functionality is achieved using WebLogic JDBC Spy , which is out of the box with WebLogic JDBC drivers for specific databases. Both of them are written to System.out, and not to the database (unless I am mistaken), so this may not be so useful.
Vineet reynolds
source share