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 configuration » Database options » Alphabetical list of database options

max_connections option

Controls the number of concurrent connections that are allowed to the database.

Allowed values

Integer (greater than or equal to 0), NULL

Default

The default limit of concurrent connections for the network database server is equal to the maximum number of connections allowed by your per-seat license or 32766 connections if you have a per-core license.

The default limit of concurrent connections for the personal server is 10, of which a minimum of 3 must be standard connections.

Scope
  PUBLIC role For current user For other users
Allowed to set permanently? Yes, with SET ANY SYSTEM OPTION No No
Allowed to set temporarily? Yes, with SET ANY SYSTEM OPTION No No
Remarks

The max_connections option specifies the number of concurrent connections that are allowed to the database. Once the limit is reached:

  • Subsequent standard connection attempts fail until the number of connections to the database falls below the specified limit.

  • Subsequent HTTP/HTTPS connection attempts are queued until the number of connections falls below the specified limit, or the queued connections time out.

    While there are connections in the HTTP/HTTPS queue, there is no opportunity for a standard connection to replace an HTTP/HTTPS connection. A user wanting to make a standard connection could wait indefinitely unless some of the database connections are reserved for standard connections. Reserve connections by using the reserved_connections option.

Even if the connection limit has been reached, a DBA user with the DROP CONNECTION or SERVER OPERATOR system privilege can make one standard connection to the database to drop connections as needed.

Example
  • The following example sets the maximum number of concurrent connections to 1000 for a database running on a network database server.

    SET OPTION PUBLIC.max_connections=1000;
  • The following example sets the maximum number of concurrent connections to 3 for a database running on a personal database server.

    SET OPTION PUBLIC.max_connections=3;