Returns the most recently-prepared SQL statement for each connection to the specified database on the server.
sa_conn_activity( [ connidparm ] )
connidparm Use this optional INTEGER parameter to specify the ID number of a connection.
|Column name||Data type||Description|
|Number||INT||The ID number of the connection.|
|Name||VARCHAR(255)||The name of the connection.|
|Userid||VARCHAR(255)||The user ID for the connection.|
|DBNumber||INT||The ID number of the database.|
|LastReqTime||VARCHAR(255)||The time at which the last request for the specified connection started.|
|LastStatement||LONG VARCHAR||The most recently-prepared SQL statement for the connection.|
The sa_conn_activity system 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. Recording of statements must be enabled for the database server prior to 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.
For information about the LastStatement property, from which these values are derived, see Connection properties.
If connidparm is not specified, then information is returned for all connections to all databases running on the database server. If connidparm is less than zero, option values for the current connection are returned.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|