Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Getting actual SQL query

Hello,

I found out that using repodebug feature, you can get SQL query generated by the app.
However the query collected in the repodebug contains '?' which is not the actual query executed on my DB2.
Does anyone know any way to know the actual query executed?

Thank you in advance.

0 votes


Accepted answer

Permanent link

That is the way it is. You cannot get more "actual" than that. Further reading is shown below.
https://en.wikipedia.org/wiki/Prepared_statement
http://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html

Kazuki Nobutani selected this answer as the correct answer

1 vote

Comments

Thank you Donald, I found out that with DB2, seems like you can capture actual queries using "AUDIT POLICY" using a parameter of "EXECUTE WITH DATA".

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 201
× 84
× 37

Question asked: Mar 27 '17, 2:02 a.m.

Question was seen: 2,669 times

Last updated: Apr 03 '17, 1:48 a.m.

Confirmation Cancel Confirm