ASA Database Administration Guide
The Database Server
The database server
Database server options
Turn on capturing of the most recently-prepared SQL statement for each connection to databases on the server.
{ dbsrv9 | dbeng9 } -zl ...
All operating systems and servers.
This feature can also be turned on using the remember_last_statement server setting. You can obtain the most recently-prepared SQL statement for a connection using the LastStatement property function. The sa_conn_activity stored procedure allows you to obtain the most recently-prepared SQL statement for all current connections to databases on the server.
For stored procedure calls, only the outermost procedure call appears, not the statements within the procedure.
sa_conn_activity system procedure
sa_server_option system procedure