number of user connections

number of user connections sets the maximum number of user connections that can simultaneously be connected to SAP ASE. 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.

Summary Information

Default value


Range of values

  • UNIX and Linux: 5–32767

  • Windows: 5–2147483647



Display level


Required role

System administrator

Configuration groups

Memory Use, User Environment

Upper limit to the maximum number of user connections

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 SAP ASE 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 SAP ASE connections, see System Administration Guide: Volume 2 > Managing Mulitprocessor Servers.

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 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.

Reserved connections

One connection from the configured number of connections is reserved for temporary administrative tasks to make sure that database administrators can connect to SAP ASE. A reserved connection has a total login time of 15 minutes, and can be is allocated only to a user who has the sa_role. SAP ASE terminates the connection after 15 minutes to ensure the availability of the reserved connection at an installation with multiple database administrators.

SAP ASE also automatically uses this reserved connection when a client uses the last resource for connecting to SAP ASE.

If SAP ASE is using a reserved connection, the following informational message appears when the user logs in to SAP ASE:
There are not enough user connections available; you are being connected
using a temporary administrative connection which will time out after '15' 
minutes. Increase the value of th 'number of user connections' parameter
SAP ASE also prints a message similar to the following to the error log when the final connection to SAP ASE terminates due to a timeout:
00:00000:00008:2003/03/14 11:25:31.36 server  Process '16' has been 
terminated as it exceeded the maximum login time allowed for such processes. 
This process used a connection reserved for system administrators and has a 
maximum login period of '15' minutes

Optimizing max number of user connections

There is no formula to determine how many connections to allow for each user. You must estimate this number, based on the system and user requirements. You must also take into account that on a system with many users, connections needed only occasionally or transiently can generally 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.

    Note: SAP suggests that you estimate the maximum number of connections used by SAP ASE and update number of user connections as you add physical devices or users to the system. Periodically use sp_who to determine the number of active user connections on your SAP ASE.

Certain other configuration parameters, including stack size and default network packet size, affect the amount of memory for each user connection.

User connections for shared memory—EJB Server

SAP ASE uses the value of number of user connections to establish the number of shared-memory connections for EJB Server. Thus, if number of user connections is 30, SAP ASE 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:
  1. Increase number of user connections to a number one-third of which is the number of desired shared-memory connections.

  2. Restart SAP ASE.

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 Users Guide.

With SAP ASE version 12.5.3 ESD #2, no sockets are automatically reserved for EJB. However, you can enable trace flag 1642 to revert to the functionality of earlier version, reserving one-third of the sockets for EJB. Enable traceflag 1642 to set up the EJB server. For this version of SAP ASE, you can ignore this message, "hbc_ninit: No sockets available for HBC", in the error log if the EJB server is not configured.

In SAP ASE version 12.5.3 and later, if the EJB server is enabled and HBC sockets are not available, "hbc_ninit: No sockets available for HBC" is reported. If traceflag 1642 is not enabled, set the flag, and restart SAP ASE. If the EJB server is not enabled, then no message is reported and SAP ASE automatically disables the sockets reserved for EJB server.