Reading and writing data and log files authorized by an alternative local security group
This task shows how to use the -a flag on the crtmqm command. The flag provides the queue manager with an alternative local security group to give it access to its log and data files.
Before you begin
- Install IBM® MQ for Windows as the primary installation.
- Run the
Prepare IBM MQ
wizard. For this task, configure the installation either to run with a local user ID, or a domain user ID. Eventually, to complete all the tasks in Windows domains and multi-instance queue managers, the installation must be configured for a domain. - Log on with Administrator authority to perform the first part of the task.
About this task
This task is one of a set of related tasks that illustrate accessing queue manager data and log files. The tasks show how to create a queue manager authorized to read and write data and log files that are stored in a directory of your choosing. They accompany the task, Windows domains and multi-instance queue managers.
On Windows, you can create the default data and log paths for an IBM MQ for
Windows in any directories of your choosing. The installation and configuration wizard automatically gives the local mqm
group, and the user ID that is running the queue manager processes, access to the directories. If you create a queue manager specifying different directories for queue manager data and log files, you must configure full control permission to the directories.
In this example, you provide the queue manager with an alternative security local group that has full control authorization to the directories. The alternative security group gives the queue manager permission to manage files in the directory. The primary purpose of the alternate security group is to authorize an alternate security global group. Use an alternate security global group to set up a multi-instance queue manager. In this example, you configure a local group to familiarize yourself with the use of an alternate security group without installing IBM MQ in a domain. It is unusual to configure a local group as an alternative security group.
The crtmqm command creates a queue manager that starts automatically when the workstation starts using the IBM MQ service.
The task is illustrative; it uses specific values that you can change. The values you can change are in italics. At the end of the task, follow the instructions to remove all the changes you made.
Procedure
What to do next
Test the queue manager by putting and getting a message to a queue.
- Start the queue manager.
The system response:strmqm QMGR
IBM MQ queue manager 'QMGR' starting.
The queue manager is associated with installation '1'.
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 test queue.
The system response:echo define qlocal(QTEST) | runmqsc QMGR
5724-H72 (C) Copyright IBM Corp. 1994, 2024. ALL RIGHTS RESERVED.
Starting MQSC for queue manager QMGR.
1 : define qlocal(QTEST)
AMQ8006: IBM MQ queue created.
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
- Put a test message using the sample program amqsput.
The system response:echo 'A test message' | amqsput QTEST QMGR
Sample AMQSPUT0 start
target queue is QTEST
Sample AMQSPUT0 end
- Get the test message using the sample program amqsget.
The system response:amqsget QTEST QMGR
Sample AMQSGET0 start
message <A test message>
Wait 15 seconds ...
no more messages
Sample AMQSGET0 end
- Stop the queue manager.
The system response:endmqm -i QMGR
IBM MQ queue manager 'QMGR' ending.
IBM MQ queue manager 'QMGR' ended.
- Delete the queue manager.
The system response:dltmqm QMGR
IBM MQ queue manager 'QMGR' deleted.
- Delete the directories you created.
Tip: Add the
/Q
option to the commands to prevent the command prompting to delete each file or directory.del /F /S C:\wmq\*.* rmdir /S C:\wmq