title: How to get the full query that a PreparedStatement is about to execute in DB2?
body: <p>I'm working on a dynamic web project and using the PreparedStatement to execute the SQL queries against the DB2 database.</p>
  
  <pre><code>String myQuery = "select id from user where name = ?";
  PreparedStatement stmt  = connection.prepareStatement(myQuery);
  stmt.setString(1, test);
  ResultSet resultSet  = statement.executeQuery();
  </code></pre>
  
  <p>How can I receive the full SQL query that is about to be executed on the DB2 server in the console?</p>