SQL history

Scott Klement's open source interface to using JDBC database drivers from RPG. http://www.scottklement.com/jdbc/
Post Reply
Bravoj
Posts: 9
Joined: Thu Jun 30, 2022 12:06 am

SQL history

Post 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.
Scott Klement
Site Admin
Posts: 652
Joined: Sun Jul 04, 2021 5:12 am

Re: SQL history

Post 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.
Bravoj
Posts: 9
Joined: Thu Jun 30, 2022 12:06 am

Re: SQL history

Post 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.
Post Reply