Summary information |
|
---|---|
Default value |
25 |
Range of values |
5–2147483647 |
Status |
Dynamic |
Display level |
Basic |
Required role |
System Administrator |
number of user connections sets the maximum number of user connections that can be connected to Adaptive Server at the same time. It does not refer to the maximum number of processes; that number depends not only on the value of this parameter but also on other system activity.
The maximum allowable number of file descriptors per process is operating-system-dependent; see the configuration documentation for your platform.
The number of file descriptors available for Adaptive Server connections is stored in the global variable @@max_connections. You can report the maximum number of file descriptors your system can use with:
select @@max_connections
The return value represents the maximum number of file descriptors allowed by the system for your processes, minus overhead. Overhead increases with the number of engines. For more information on how multiprocessing affects the number file descriptors available for Adaptive Server connections, see “Managing user connections”.
In addition, you must reserve a number of connections for the following items, which you also set with configuration parameters:
The database devices, including mirror devices
Site handlers
Network listeners
The following formula determines how high you can set number of user connections, number of devices, max online engines, number of remote sites, and max number network listeners:
number of user connections + (number of devices * max online engines * 2) + number of remote sites + max number network listeners cannot be greater than the value of @@max_connections.
There is no formula for determining how many connections to allow for each user. You must estimate this number, based on the system and user requirements described here. You must also take into account that on a system with many users, there is more likelihood that connections needed only occasionally or transiently can be shared among users. The following processes require user connections:
One connection is needed for each user running isql.
Application developers use one connection for each editing session.
The number of connections required by users running an application depends on how the application has been programmed. Users executing Open Client programs need one connection for each open DB-Library dbprocess or Client-Library cs_connection.
It is a good idea to estimate the maximum number of connections that will be used by Adaptive Server and to update number of user connections as you add physical devices or users to the system. Use sp_who periodically to determine the number of active user connections on your Adaptive Server.
Certain other configuration parameters, including stack size and default network packet size, affect the amount of memory for each user connection.
Adaptive Server uses the value of the number of user connections parameter to establish the number of shared-memory connections for EJB Server. Thus, if number of user connections is 30, Adaptive Server establishes 10 shared-memory connections for EJB Server. Shared-memory connections are not a subset of user connections, and are not subtracted from the number of user connections.
To increase the number of user connections for shared memory, you must:
Increase number of user connections to a number one-third of which is the number of desired shared-memory connections.
Restart Adaptive Server.
Although number of user connections is a dynamic configuration parameter, you must restart the server to change the number of user connections for shared memory. See the EJB Server User’s Guide for more information.