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 Creating a multi-instance queue manager on domain workstations or servers on Windows.
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.
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
-
Create the directories that are to contain the queue manager data and log files.
-
On mars, type the command:
md c:\wmq\data , c:\wmq\logs
-
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.
-
In Windows Explorer, right-click .
-
Click the Security tab and click .
-
Clear the check box for Include inheritable permissions from this object's
owner. Click Copy in the Windows Security window.
-
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.
-
Click Add..., and type the name of the domain local group mqm. Click Check Names
-
In response to a Windows Security window, Type the
name and password of the Domain Administrator and click .
-
In the Permission Entry for wmq window, select Full
Control in the list of Permissions.
-
Click
-
Repeat steps e to h to add
Domain Administrators.
-
In Windows Explorer, right-click .
-
Click Advanced Sharing... and select the Share this
folder check box. Leave the share name as wmq.
-
Click , and type the name of the domain local group
mqm ; Domain Administrators. Click Check
Names.
-
In response to a Windows Security window, Type the
name and password of the Domain Administrator and click .
-
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.
-
Start the queue manager on sun, permitting a standby instance.
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.
-
Create a second instance of QMGR on earth.
-
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
-
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
-
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.
-
Start the standby instance of the queue manager on earth.
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:
- 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.
- 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 Verifying the multi-instance queue manager on Windows.