User database connections

This topic describes how to determine the number of database connections a broker requires for capacity and resource planning. The broker makes a database connection to the ODBC data source name (DSN) for each DSN even if different DSNs resolve to the same physical database.

The number of connections to a user database that a broker requires depends 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 a different node on the same thread uses the same DSN, 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 then caches the 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 Configuring access to databases.

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

If you are using DB2 for your database, DB2's default action 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 database documentation for information about connections and limits or restrictions.

Related concepts
Message flows overview
Related tasks
Configuring access to 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