Connecting to the databases

The broker uses ODBC to access its database and you must set up an ODBC connection on each broker system. This topic describes the connections that a broker database needs, and the ODBC parameters that you must tailor for the connections:

To define the connection, link to the topic for your operating system:

Broker database connections

The number of connections required by the broker to its database depend to some extent on the actions of the message flows it is processing. The following connections are required for each broker:

  • Five by internal broker threads.
  • One for each Publish/Subscribe neighbor, if the topology has been deployed.
  • One for each message flow thread that contains a publication node.
  • One for each message flow thread that parses MRM messages.
  • A further number if you are using SCADA nodes with WebSphere MQ Everyplace. The exact number to add depends on whether thread pooling is being used (determined by the Use Thread Pooling property of the SCADAInput node):
    • If Use Thread Pooling is not selected (the default setting) add the number of SCADA clients that will connect to the SCADAInput node.
    • If Use Thread Pooling is selected, add the value in the Max Threads property of the SCADAInput node. The default value is 500.

If you are using the same database for several brokers, you must take account of all brokers in your calculations.

The connections for neighbors and publication nodes are only required if you are using retained publications.

When you start a broker, it opens all connections that it requires to the broker database for its own operation. When 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 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.

ODBC.ini Parameters

Configure the template files by updating the following parameters. Some parameters are not applicable to all databases, as shown.

[ODBC Data Sources]
This stanza describes the data source names (DSNs) for the databases that are configured in the .odbc.ini file. You must configure this stanza to show all your databases, and you must include a stanza for each one.
Driver
  • If you are using DB2, specify the location of the driver library that matches your DB2 installation.
  • If you are using Oracle or Sybase, use the path exactly as shown.
Description
You can change this if you choose. This is a text field for information only and has no bearing on operation.
Database (DB2, Sybase)
  • If you are using DB2, specify the database alias. If you are using a remote DB2 database, you must set up your client-server connection to resolve this alias to the correct database. For more information, see the DB2 documentation.
  • If you are using Sybase, specify the name of the database to which you want to connect by default. If you do not specify a value, the default is the database defined by your system administrator for each user.
NetworkAddress (Sybase only)
Specify the network address of your Sybase server (this is required for local and remote databases). Specify an IP address as follows:
<servername or IP address>, <portnumber>

For example Sybaseserver, 5000. You can also specify the IP address directly, for example 199.226.224.34, 5000. You can find the port number in the Sybase interfaces file which is typically named interfaces, interfac, or sql.ini, depending on the operating system.

SelectUserName= (Sybase only)
This must be set to 1.
ServerName (Sybase, Oracle)
  • If you are using Oracle, specify the "Service Name" that resolves to a "Connect Descriptor", for example through a mapping in the TSNAMES.ORA file.
  • If you are using Sybase, specify the name of the Sybase database server that you have defined on the server computer.
WorkstationID (Sybase only)
Type the workstation identifier. For example, mqsiuid.
Related reference
Supported databases