+

Search Tips | Advanced Search

Create a multi-instance queue manager on domain workstations or servers on Windows

An example shows how to set up a multi-instance queue manager on Windows on a workstation or a server that is part of a Windows domain. The server does not have to be a domain controller. The setup demonstrates the concepts involved, rather than being production scale. The example is based on Windows Server 2008. The steps might differ on other versions of Windows Server.

In a production scale configuration, you might have to tailor the configuration to an existing domain. For example, you might define different domain groups to authorize different shares, and to group the user IDs that run queue managers.

The example configuration consists of three servers:

    sun
    A Windows Server 2008 domain controller. It owns the wmq.example.com domain that contains Sun, mars, and venus. For the purposes of illustration, it is also used as the file server.

    mars
    A Windows Server 2008 used as the first IBM MQ server. It contains one instance of the multi-instance queue manager called QMGR.

    venus
    A Windows Server 2008 used as the second IBM MQ server. It contains the second instance of the multi-instance queue manager called QMGR.

Replace the italicized names in the example, with names of our choosing.


Before starting

On Windows, we do not need to verify the file system that we plan to store queue manager data and log files on. The checking procedure, Verify shared file system behavior, is applicable to UNIX and Linux . On Windows, the checks are always successful.

Do the steps in the following tasks. The tasks create the domain controller and domain, install IBM MQ for Windows on one server, and create the file share for data and log files. If we are configuring an existing domain controller, you might find it useful to try out the steps on a new Windows Server 2008. We can adapt the steps to your domain.

  1. Create an Active Directory and DNS domain on Windows.
  2. Installing IBM MQ on a server or workstation in a Windows domain.
  3. Create a shared directory for queue manager data and log files on Windows.
  4. Reading and writing shared data and log files authorized by an alternative global security group.


This task is one of a sequence of tasks to configure a domain controller and two servers in the domain to run instances of a queue manager. In this task you configure a second server, venus, to run another instance of the queue manager QMGR. Follow the steps in this task to create the second instance of the queue manager, QMGR, and test that it works.

This task is separate from the four tasks in the preceding section. It contains the steps that convert a single instance queue manager into a multi-instance queue manager. All the other steps are common to single or multi-instance queue managers.


Procedure

  1. Configure a second server to run IBM MQ for Windows.
    1. Do the steps in the task Installing IBM MQ on a server or workstation in a Windows domain to create a second domain server. In this sequence of tasks the second server is called venus. Tip: Create the second installation using the same installation defaults for IBM MQ on each of the two servers. If the defaults differ, you might have to tailor the Prefix and the InstallationName variables in the QMGR QueueManager stanza in the IBM MQ configuration file mqs.ini. The variables refer to paths that can differ for each installation and queue manager on each server. If the paths remain the same on every server, it is simpler to configure a multi-instance queue manager.

  2. Create a second instance of QMGR on venus.
    1. If QMGR on mars does not exist, do the task Reading and writing shared data and log files authorized by an alternative global security group, to create it
    2. Check the values of the Prefix and InstallationName parameters are correct for venus.

      On mars, run the dspmqinf command:

      dspmqinf QMGR
      
      The system response:
      QueueManager:
      Name=QMGR
      Directory=QMGR
      Prefix=C:\ProgramData\IBM\MQ
      DataPath=\\sun\wmq\data\QMGR
      InstallationName=Installation1

    3. Copy the machine-readable form of the QueueManager stanza to the clipboard.

      On mars run the dspmqinf command again, with the -o command parameter.

      dspmqinf -o command QMGR
      
      The system response:
      addmqinf -s QueueManager -v Name=QMGR
      -v Directory=QMGR -v Prefix="C:\ProgramData\IBM\MQ"
      -v DataPath=\\sun\wmq\data\QMGR

    4. On venus run the addmqinf command from the clipboard to create an instance of the queue manager on venus.

      Adjust the command, if necessary, to accommodate differences in the Prefix or InstallationName parameters.

      addmqinf -s QueueManager -v Name=QMGR
      -v Directory=QMGR -v Prefix="C:\ProgramData\IBM\MQ"
      -v DataPath=\\sun\wmq\data\QMGR
      

      IBM MQ configuration information added.

  3. Start the queue manager QMGR on venus, permitting standby instances.
    1. Check QMGR on mars is stopped.

      On mars, run the dspmq command:

      dspmq -m QMGR
      
      The system response depends on how the queue manager was stopped; for example:
      C:\Users\Administrator>dspmq -m QMGR
      QMNAME(QMGR) STATUS(Ended immediately)

    2. On venus run the strmqm command to start QMGR permitting standbys:
      strmqm -x QMGR
      
      The system response:
      IBM MQ queue manager 'QMGR' starting.
      The queue manager is associated with installation 'Installation1'.
      5 log records accessed on queue manager 'QMGR' during the log
      replay phase.
      Log replay for queue manager 'QMGR' complete.
      Transaction manager state recovered for queue manager 'QMGR'.
      IBM MQ queue manager 'QMGR' started using V7.1.0.0.


Results

To test the multi-instance queue manager switches over, do the following steps:
  1. On mars, run the strmqm command to start QMGR permitting standbys:
    strmqm -x QMGR
    
    The system response:
    IBM MQ queue manager 'QMGR' starting.
    The queue manager is associated with installation 'Installation1'.
    A standby instance of queue manager 'QMGR' has been started.
    The active instance is running elsewhere.

  2. On venus run the endmqm command:
    endmqm -r -s -i QMGR
    
    The system response on venus:
    IBM MQ queue manager 'QMGR' ending.
    IBM MQ queue manager 'QMGR' ending.
    IBM MQ queue manager 'QMGR' ending.
    IBM MQ queue manager 'QMGR' ending.
    IBM MQ queue manager 'QMGR' ending.
    IBM MQ queue manager 'QMGR' ending.
    IBM MQ queue manager 'QMGR' ended, permitting switchover to
    a standby instance.

    And on mars:
    dspmq
    QMNAME(QMGR) STATUS(Running as standby)
    C:\Users\wmquser2>dspmq
    QMNAME(QMGR) STATUS(Running as standby)
    C:\Users\wmquser2>dspmq
    QMNAME(QMGR)  STATUS(Running)


What to do next

To verify a multi-instance queue manager using sample programs; see Verify the multi-instance queue manager on Windows.

Parent topic: Windows domains and multi-instance queue managers

Last updated: 2020-10-04