Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » System procedures » Alphabetical list of system procedures

sa_conn_list system procedure

Returns a result set containing connection IDs.

Syntax
sa_conn_list( 
[ connidparm 
[, dbidparm ] ]
)
Parameters
  • connidparm

    Use this optional INTEGER parameter to specify the connection ID number. The default is NULL.

  • dbidparm

    Use this optional INTEGER parameter to specify the database ID number. The default is NULL.

Result set
Column name Data type Description
Number INTEGER

Returns the connection ID (a number) for the current connection.

Remarks

If connidparm is greater than zero, then information for the supplied connection is returned. If connidparm is less than zero, then information for the current connection is returned. If connidparm and dbidparm are not supplied or are NULL, then connection IDs for all connections to all databases running on the database server are returned.

If connidparm is NULL and dbidparm is greater than or equal to zero, then connection IDs for only that database are returned. If connidparm is NULL and dbidparm is less than zero, then connection IDs for just the current database are returned.

Privileges

You must have EXECUTE privilege on the system procedure.

To obtain a list of all connection IDs, you must also have either the SERVER OPERATOR, MONITOR, or DROP CONNECTION system privilege.

Side effects

None

Example

The following example uses the sa_conn_list system procedure to display a list of connection IDs.

CALL sa_conn_list( );
Number
1,949
1,948
...