You can set the SQLIDEBUG environment variable on
the client side.
This will trace all SQL statements exchanged between the
client (your application) and the databaseserver.
You normally set SQLIDEBUG in the environment where you
start your client program:
export SQLIDEBUG=2:/<directory_name>
After starting your client program, there are binary files
created under the above directory.
You can use sqliprint to analyze these files.
Check 'sqliprint -h'.
You can also set SQLIDEBUG before starting 'oninit'. However
this will produce a lot of trace files for every connected
database session, so I would not recommend this.
sqliprint is delivered with the ClientSDK and is an undocumented
tool.