Page 1 of 1

SQL history

Posted: Tue May 09, 2023 2:20 am
by Bravoj
I am using the JDBC_PrepStmt to access Oracle from the AS400 using a jdbc8 driver. If my sql statement uses no where clause it runs fine . If I include parameters then I get no results. I know I should get data because I execute the statement in Oracle first. Is there a way to view the actual sql statement that is being sent to Oracle? Or view any logs other than the current job log which doesn’t give me much. Thank you in advance.

Re: SQL history

Posted: Tue May 09, 2023 2:53 am
by Scott Klement
What is "jdbc8" I have never heard of that before. Do you mean Java SE 8?

JDBCR4 does not modify your SQL statement. So, whatever statement you are sending to it is the one that is being executed. If you want to log it, you can simply write your statement to a file somewhere. You could also look into whether your Oracle server maintains any logs.

Re: SQL history

Posted: Tue May 09, 2023 2:45 pm
by Bravoj
Sorry , I meant ojdbc8.jar which is the new driver that we need for Oracle 19. The ojdbc14.jar was casuing us problems. Ok, thank you Scott.