Create a multi-instance queue manager on domain controllers

An example shows how to set up a multi-instance queue manager on Windows on domain controllers. 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.

The configuration uses the concept of a mini-domain, or domainlet ; see Windows 2000, Windows Server 2003, and Windows Server 2008 cluster nodes as domain controllers. To add multi-instance queue managers to an existing domain, see Create a multi-instance queue manager on domain workstations or servers.

The example configuration consists of three servers:
sun
A Windows Server 2008 server used as the first domain controller. It defines the wmq.example.com domain that contains sun , earth , and mars . It contains one instance of the multi-instance queue manager called QMGR .
earth
A Windows Server 2008 used as the second domain controller IBM® MQ server. It contains the second instance of the multi-instance queue manager called QMGR .
mars
A Windows Server 2008 used as the file server.

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

Before you begin

  1. On Windows, you do not need to verify the file system that you plan to store queue manager data and log files on. The checking procedure, Verifying shared file system behavior, is applicable to UNIX and Linux®. On Windows, the checks are always successful.
  2. Do the steps in Creating an Active Directory and DNS domain for IBM MQ to create the first domain controller.
  3. Do the steps in Adding a second domain controller to the wmq.example.com domain to add a second domain controller, install IBM MQ for Windows on both domain controllers, and verify the installations.
  4. Do the steps in Installing IBM MQ on domain controllers in the wmq.example.com domain to install IBM MQ on the two domain controllers.

About this task

On a file server in the same domain create a share for the queue manager log and data directories. Next, create the first instance of a multi-instance queue manager that uses the file share on one of the domain controllers. Create the other instance on the other domain controller and finally verify the configuration. You can create the file share on a domain controller.

In the sample, sun is the first domain controller, earth the second, and mars is the file server.

Procedure

  1. Create the directories that are to contain the queue manager data and log files.
    1. On mars , type the command:
      
      md c:\wmq\data , c:\wmq\logs
      
  2. Share the directories that are to contain the queue manager data and log files.

    You must permit full control access to the domain local group mqm, and the user ID you use to create the queue manager. In the example, user IDs that are members of Domain Administrators have the authority to create queue managers.

    The file share must be on a server that is in the same domain as the domain controllers. In the example, the server mars is in the same domain as the domain controllers.

    1. In Windows Explorer, right-click c:\wmq > Properties.
    2. Click the Security tab and click Advanced > Edit....
    3. Clear the check box for Include inheritable permissions from this object's owner. Click Copy in the Windows Security window.
    4. Select the lines for Users in the list of Permission entries and click Remove. Leave the lines for SYSTEM, Administrators, and CREATOR OWNER in the list of Permission entries.
    5. Click Add..., and type the name of the domain local group mqm . Click Check Names
    6. In response to a Windows Security window, Type the name and password of the Domain Administrator and click OK > OK.
    7. In the Permission Entry for wmq window, select Full Control in the list of Permissions.
    8. Click OK > Apply > OK > OK > OK
    9. Repeat steps e to h to add Domain Administrators.
    10. In Windows Explorer, right-click c:\wmq > Share....
    11. Click Advanced Sharing... and select the Share this folder check box. Leave the share name as wmq .
    12. Click Permissions > Add..., and type the name of the domain local group mqm ; Domain Administrators. Click Check Names.
    13. In response to a Windows Security window, Type the name and password of the Domain Administrator and click OK > OK.
  3. Create the queue manager QMGR on the first domain controller, sun .
    
    crtmqm -sax -u SYSTEM.DEAD.LETTER.QUEUE -md \\mars\wmq\data -ld \\mars\wmq\logs QMGR
    

    The system response:


    IBM MQ queue manager created.
    Directory '\\mars\wmq\data\QMGR' created.
    The queue manager is associated with installation 'Installation1'.
    Creating or replacing default objects for queue manager 'QMGR'.
    Default objects statistics : 74 created. 0 replaced. 0 failed.
    Completing setup.
    Setup completed.

  4. Start the queue manager on sun , permitting a standby instance.
    
    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.

  5. Create a second instance of QMGR on earth .
    1. Check the values of the Prefix and InstallationName parameters are correct for earth .

      On sun , run the dspmqinf command:

      
      dspmqinf QMGR
      

      The system response:


      QueueManager:
      Name=QMGR
      Directory=QMGR
      Prefix=C:\ProgramData\IBM\MQ
      DataPath=\\mars\wmq\data\QMGR
      InstallationName=Installation1

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

      On sun 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=\\mars\wmq\data\QMGR

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

      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:\Program Files\IBM\WebSphere MQ"
      -v DataPath=\\mars\wmq\data\QMGR
      

      IBM MQ configuration information added.
  6. Start the standby instance of the queue manager on earth .
    
    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.

Results

Verify that the queue manager switches over from sun to earth :
  1. On sun , run the command:
    
    endmqm -i -r -s QMGR
    
    The system response on sun :

    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.

  2. On earth repeatedly type the command:
    
    dspmq
    
    The system responses:

    QMNAME(QMGR) STATUS(Running as standby)
    QMNAME(QMGR) STATUS(Running as standby)
    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.