Managing queue-sharing groups

You can add or remove a queue manager to a queue-sharing group, and manage the associated Db2® tables.

Adding a queue-sharing group to the Db2 tables

To add a queue-sharing group to the Db2 tables, use the ADD QSG function of the queue-sharing group utility (CSQ5PQSG). This program is described in The queue-sharing group utility. A sample is provided in thlqual.SCSQPROC(CSQ45AQS).

Adding a queue manager to a queue-sharing group

A queue manager can be added to a queue-sharing group and this topic describes some of the limitations.

To add a queue manager to a queue-sharing group, use the ADD QMGR function of the queue-sharing group utility (CSQ5PQSG). This program is described in The queue-sharing group utility. A sample is provided in thlqual.SCSQPROC(CSQ45AQM).

The queue-sharing group must exist before you can add queue managers to it.

Queue-sharing groups have a name of up to four characters. The name must be unique in your network, and must be different from any queue manager names.

A queue manager can only be a member of one queue-sharing group.

Note: To add a queue manager to an existing queue-sharing group containing queue managers running earlier versions of IBM® MQ, you must first apply the coexistence PTF for the highest version of IBM MQ in the group to every earlier version queue manager in the group.

Removing a queue manager from a queue-sharing group

You can only remove a queue manager from a queue-sharing group if the queue manager's logs are not needed by another process. The logs are needed if they contain:
  • the latest backup of one of the coupling facility (CF) application structures used by the queue-sharing group
  • data needed by a future restore process, that is, the queue manager has used a recoverable structure since the time described by the last backup exclusion interval value.
If either or both of these points apply, the queue manager cannot be removed. To determine which queue managers' logs are needed for a future restore process, use the MQSC DISPLAY CFSTATUS command with the TYPE(BACKUP) option (for details of this command, see DISPLAY CFSTATUS ).
If the queue manager logs are not needed, take the following steps to remove the queue manager from the queue-sharing group:
  1. Resolve any indoubt units of work involving this queue manager.
  2. Shut the queue manager down cleanly using STOP QMGR MODE(QUIESCE).
  3. Wait for an interval at least equivalent to the value of the EXCLINT parameter you will specify in the BACKUP CFSTRUCT command in the next step.
  4. On another queue manager, run a CF structure backup for each recoverable CF structure by using the MQSC BACKUP CFSTRUCT command and specifying an EXCLINT value as required in the previous step.
  5. Use the REMOVE QMGR function of the CSQ5PQSG utility to remove the queue manager from the queue-sharing group. This program is described in The queue-sharing group utility. A sample is provided in thlqual.SCSQPROC(CSQ45RQM).
  6. Before restarting the queue manager, reset the QSGDATA system parameter to its default value. See Using CSQ6SYSP for information about how to tailor your system parameters.

Note, that when removing the last queue manager in a queue sharing group, you must use the FORCE option, rather than REMOVE. This removes the queue manager from the queue sharing group, while not performing the consistency checks of the queue manager logs being required for recovery. You should only perform this operation if you are deleting the queue sharing group.

Removing a queue-sharing group from the Db2 tables

To remove a queue-sharing group from the Db2 tables, use the REMOVE QSG function of the queue-sharing group utility (CSQ5PQSG). This program is described in The queue-sharing group utility. A sample is provided in thlqual.SCSQPROC(CSQ45RQS).

You can only remove a queue-sharing group from the common Db2 data-sharing group tables after you have removed all the queue managers from the queue-sharing group (as described in Removing a queue manager from a queue-sharing group ).

When the queue-sharing group record is deleted from the queue-sharing group administration table, all objects and administrative information relating to that queue-sharing group are deleted from other IBM MQ Db2 tables. This includes shared queue and group object information.

Validating the consistency of Db2 definitions

Problems for shared queues within a queue-sharing group can occur if the Db2 object definitions have, for any reason, become inconsistent.

To validate the consistency of the Db2 object definitions for queue managers, CF structures, and shared queues, use the VERIFY QSG function of the queue-sharing group utility (CSQ5PQSG). This program is described in The queue-sharing group utility.