Returns the most recently-prepared SQL statement for each connection to the indicated database on the server.
sa_conn_activity( [ connidparm ] )
connidparm Use this optional INTEGER parameter to specify the connection ID number. The default is NULL.
|Column name||Data type||Description|
Returns the connection ID (a number) for the current connection.
Returns the name of the current connection.
Temporary connection names have INT: prepended to the connection name
Returns the user ID for the connection.
Returns the ID number of the database.
Returns the time at which the last request for the specified connection started. This property can return an empty string for internal connections, such as events.
Returns the most recently prepared SQL statement for the current connection.
If connidparm is less than zero, then information for the current connection is returned. If connidparm is not supplied or is NULL, then information is returned for all connections to all databases running on the database server.
The sa_conn_activity system procedure returns a result set consisting of the most recently-prepared SQL statement for the connection. Recording of statements must be enabled for the database server before calling sa_conn_activity. To do this, specify the -zl option when starting the database server, or execute the following:
This procedure is useful when the database server is busy and you want to obtain information about the last SQL statement prepared for each connection. This feature can be used as an alternative to request logging.
Cloud note: Because of tenant database isolation rules, when this system procedure is run in the cloud it returns only information about the current tenant database.
No privileges are required to execute this system procedure for the current connection ID. To execute this system procedure for other connections, you must have either the SERVER OPERATOR, MONITOR, or DROP CONNECTION system privilege.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|