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 - Database Administration » Database connections

Connection IDs

When a user connects to a database, the database server assigns the user's connection a unique connection ID.

A database server connection forms a channel through which all activity from the client application takes place. Client applications cannot interact with the database server until a connection is made. When a database server connection is made, a user's privileges determine what actions the user is authorized to perform on the database server.

Connection IDs for temporary connections start at one billion.

For each new connection to the database server, the server increments the connection ID value by one. These connection IDs are logged in the database server message log, which records informational messages, errors, warnings, and messages from the MESSAGE statement. The connection ID can be used to perform the following tasks:

  • filter request logging information
  • identify which connection has a lock on the database
  • track the total number of connections to a database server since it started and the order in which those connections were made

You can use the CONNECTION_PROPERTY function to obtain a user's connection ID by querying the Number connection property.