The amqmdain command applies to WebSphere MQ for Windows only.
In WebSphere MQ Version 6.0 all WebSphere MQ services were migrated to WebSphere MQ service or listener objects, with the exception of ROOT custom services and queue manager services.
Use amqmdain to define and administer ROOT custom services, define and administer queue manager services, and perform other Windows specific administrative tasks.
Starting a queue manager service with amqmdain is not the same as using strmqm from the command line, because the WebSphere MQ service executes in a non-interactive session, running under a different user account.
To administer and define WebSphere MQ service and listener objects, use MQSC commands, PCF commands, or the WebSphere MQ Explorer.
>>-amqmdain--+- qmgr start QMgrName------------------------+--->< | .- -c -. | +- qmgr end QMgrName-+------+-----------------+ | +- -w -+ | | +- -i -+ | | '- -p -' | +- qmgr alter QMgrName- -i Initiation---------+ +- svc list ----------------------------------+ +- svc view ServiceName-----------------------+ +- svc start ServiceName----------------------+ +- svc end ServiceName------------------------+ +- svc alter ServiceName-| Service options |--+ +- svc delete ServiceName---------------------+ +- svc define ServiceName-| Service options |-+ +- auto QMgrName------------------------------+ +- manual QMgrName----------------------------+ +- status -+----------+-----------------------+ | +-QMgrName-+ | | '-all------' | +- regsec ------------------------------------+ +- spn QMgrName-+-set---+---------------------+ | '-unset-' | '- reg -+----------+-RegParams----------------' +-QMgrName-+ '- * ------' Service options: |--+--------------+--+----------------+--+-------------+--------> '- -m QMgrName-' '- -i Initiation-' '- -t Service-' >--+--------------+--+--------------+--+---------------+--------| '- -s command-' '- -e command-' '- -x Execution-'
All parameters are required unless the description states they are optional.
In every case, QMgrName is the name of the queue manager service to which the command applies, and ServiceName is the name of the ROOT custom services to which the command applies.
This parameter can also be written in the form start QMgrName.
This parameter can also be written in the form end QMgrName.
auto | Sets a queue manager service to automatic startup. | |
manual | Sets a queue manager service to manual startup. |
If no parameter is supplied: | Displays the status of the WebSphere MQ services. | |
If a QMgrName is supplied: | Displays the status of the named queue manager service. | |
If the parameter all is supplied: | Displays the status of all ROOT custom services. |
If RegParams is specified alone: | Modifies queue manager configuration information in the Windows Registry related to the default queue manager. | |
If QMgrName and RegParams are specified: | Modifies queue manager configuration information in the Windows Registry related to the queue manager specified by QMgrName. | |
If * and RegParams are specified: | Modifies WebSphere MQ configuration information in the Windows Registry. |
The parameter, RegParams, specifies the Registry stanzas to change, and the changes that are to be made. RegParams takes one of the following forms:
If you are specifying queue manager configuration information, the valid values for stanza are:
XAResourceManager\name ApiExitLocal\name CHANNELS ExitPath Log QueueManagerStartup TCP LU62 SPX NetBios Connection QMErrorLog Broker
If you are modifying WebSphere MQ configuration information, the valid values for stanza are:
ApiExitCommon\name ApiExitTemplate\name ACPI AllQueueManagers CHANNELS DefaultQueueManager LogDefaults ExitProperties
The following are usage considerations:
If no parameter is supplied: | The service is defined as a ROOT custom service with no associated queue manager. | |
If QMgrName is supplied: | The queue manager specified by QMgrName is used. |
auto | Sets the ROOT custom service to automatic startup. | |
manual | Sets the ROOT custom service to manual startup. |
process | The ROOT custom service is not expected to run to completion. To end the ROOT custom service, issue the svc end ServiceName command. | |
command | The ROOT custom service is expected to run to completion. |
prefix | The ROOT custom service starts before the associated queue manager starts. | |
suffix | The ROOT custom service starts after the associated queue manager starts. |
The following example adds an XAResourceManager to queue manager TEST. The commands issued are:
amqmdain reg TEST -c add -s XAResourceManager\Sample -v SwitchFile=sf1 amqmdain reg TEST -c add -s XAResourceManager\Sample -v ThreadOfControl=THREAD amqmdain reg TEST -c add -s XAResourceManager\Sample -v XAOpenString=openit amqmdain reg TEST -c add -s XAResourceManager\Sample -v XACloseString=closeit
To display the values set by the commands above, use:
amqmdain reg TEST -c display -s XAResourceManager\Sample -v *
The display would look something like this:
0784726, 5639-B43 (C) Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED. Displaying registry value for Queue Manager 'TEST' Attribute = Name, Value = Sample Attribute = SwitchFile, Value = sf1 Attribute = ThreadOfControl, Value = THREAD Attribute = XAOpenString, Value = openit Attribute = XACloseString, Value = closeit
To remove the XAResourceManager from queue manager TEST, use:
amqmdain reg TEST -c remove -s XAResourceManager\Sample -v *
0 | Command completed normally |
-2 | Syntax error |
-3 | Failed to initialize COM library |
-4 | Failed to initialize COM components |
-7 | Failed to configure service |
-9 | Unexpected Registry error |
-10 | Unable to access required service interface (IMQDService) |
-11 | Unable to access required service interface (ICustomService) |
-12 | Unable to access required service interface (ICustomServices) |
-13 | Unable to access required service interface (IUnknown) |
-14 | Specified service not found |
-15 | Specified service name already exists |
-16 | Failed to configure service principal name |
-17 | Failed to start service |
-18 | Failed to end service |
-19 | Failed to delete service |
-20 | Failed to store service definition |
-21 | Service initiation type could not be configured |
-22 | Service flags could not be configured |
-23 | Service flags could not be read |
-24 | Service dependency could not be configured |
-25 | Service start command could not be configured |
-26 | Service end command could not be configured |
-27 | Service name could not be configured |
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
zamqmdain |