User database connections

Determine the number of database connections required by a broker for capacity and resource planning. A database connection is made by the broker to the ODBC data source name (DSN); a connection is made for each DSN even if different DSNs resolve to the same physical database.

The number of connections required by the broker to a user database depend on the actions of the message flows that access the database. For each broker that accesses a database, one connection is required for every ODBC data source name (DSN) for each message flow thread. If the same DSN is used by a different node on the same thread, the same connection is used unless a different transaction mode is used, in which case another connection is required. This is explained further in Database connections for coordinated message flows.

When you start a broker, it opens all the connections that it requires. The broker caches these database connection handles for performance reasons. For example, when a message flow node initiates access to a user database, it opens a connection for the data source. This is done the first time that a message is processed by that message flow node. This connection remains open until the execution group or broker is shut down.

If you are using the same database for user application data and for broker internal data, add the two connection requirements together when you calculate how many connections are required. For details of broker database connection requirements, see Connecting to the databases.

If you stop the broker, it releases all current database connection handles.

If you are using DB2 for your database, the default action taken by DB2 is to limit the number of concurrent connections to a database to the value of the maxappls configuration parameter. The default for maxappls is 40. If you believe that the connections that the broker might require exceed the value for maxappls, increase this and the associated parameter maxagents to new values based on your calculations.

If you are using another database, check the appropriate product documentation for information about connections and limits or restrictions.

Related concepts
Message flows

Related tasks
Connecting to the databases
Accessing databases from message flows
Configuring coordinated message flows

Related reference
Supported databases
Built-in nodes
User database DBCS restrictions
Database connections for coordinated message flows