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

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sa_conn_options system procedure Next Page

sa_conn_properties system procedure


Reports connection property information.

Syntax

sa_conn_properties( [ connidparm ] )

Arguments
Result set
Column nameData typeDescription
NumberINTEGERThe ID number of the connection.
PropNumINTEGERThe connection property number.
PropNameVARCHAR(255)The connection property name.
PropDescriptionVARCHAR(255)The connection property description.
ValueLONG VARCHARThe connection property value.
Remarks

Returns the connection ID as Number, and the PropNum, PropName, PropDescription, and Value for each available connection property. Values are returned for all connection properties, database option settings related to connections, and statistics related to connections.

If no connidparm is supplied, properties for all connections to the current database are returned. If connidparm is less than zero, option values for the current connection are returned.

Permissions

None

Side effects

None

See also
Examples

The following example uses the sa_conn_properties system procedure to return a result set summarizing connection property information for all connections.

CALL sa_conn_properties( )
NumberPropNumPropName...
7937CacheHits...
7938CacheRead...
............

This example uses the sa_conn_properties system procedure to return a list of all connections, in decreasing order by CPU time*:

SELECT Number AS connection_number,
    CONNECTION_PROPERTY ( 'Name', Number ) AS connection_name,
    CONNECTION_PROPERTY ( 'Userid', Number ) AS user_id,
  CAST ( Value AS NUMERIC ( 30, 2 ) ) AS approx_cpu_time
  FROM sa_conn_properties()
  WHERE PropName = 'ApproximateCPUTime'
  ORDER BY approx_cpu_time DESC;

*Example courtesy of Breck Carter, RisingRoad Professional Services. [external link] http://www.risingroad.com