Nicky,
You can use the %System->%SQL family of audit events.
From the docs:
| Event Source | Event Type and Event | Occurs When | Event Data Contents | Default Status |
|---|---|---|---|---|
| %System |
%SQL/ DynamicStatement |
A dynamic SQL call is executed. | The statement text and the values of any host-variable arguments passed to it. If the total length of the statement and its parameters exceeds 3,632,952 characters, the event data is truncated. | Off |
| %System |
%SQL/ EmbeddedStatement |
An embedded SQL call is executed. See below for usage details. | The statement text and the values of any host-variable arguments passed to it. If the total length of the statement and its parameters exceeds 3,632,952 characters, the event data is truncated. | Off |
| %System |
%SQL/ XDBCStatement |
A remote SQL call is executed using ODBC or JDBC. | The statement text and the values of any host-variable arguments passed to it. If the total length of the statement and its parameters exceeds 3,632,952 characters, the event data is truncated. | Off |
If you're interested only with JDBC you can stick with the last event above (XDBCStatement).
Note, while we're on the subject, if you're looking for "fancier" kind of auditing, for example to log changed fields (before and after values), you can check this thread by @Fabio.Goncalves.
- Log in to post comments



