Returns the most recently prepared SQL statement for each connection to databases on the server.
sa_conn_activity
None
None
The sa_conn_activity procedure returns a result set consisting of the most recently prepared SQL statement for each connection if the server has been told to collect the information. To obtain the result set, specify the -zl option when starting the database server or execute the following:
CALL sa_server_option('Remember_last_statement','ON')
This procedure is useful when the database server is busy and you want to obtain information about what SQL statement is prepared for each connection. This feature can be used as an alternative to request-level logging.
For information on the LastStatement property from which these values are derived, see the Adaptive Server Anywhere Database Administration Guide.
For information about the -zl command line option, see Chapter 1, “Running the Database Server” in Sybase IQ Utility Guide.
For information about the remember_last_statement setting, see “sa_server_option system procedure”.