Monday 11 August 2014

Message Broker Commands


  • Create BROKER_CONFIG_DB manually

             
mqsicreatedb <DBNAME> -i <USERNAME> -a <PASSWORD>
crtmqm -q <QUEUE_MGR_NAME>






         
strmqm <QUEUE_MGR_NAME>  
mqsicreateconfigmgr <CONFIG_MGR_NAME> -i <USERNAME> -a <PASSWORD> -q <QUEUE_MGR_NAME>
mqsicreatebroker <BROKER_NAME> -i <USERNAME> -a <PASSWORD> -q <QUEUE_MGR_NAME> -n <DBNAME>  
       
mqsicreatedb NDB -i patiln2 -a Sep@2012  
crtmqm -q NQMGR -p 
strmqm N_QUEUEMGR  
       
mqsicreateconfigmgr N_CONFIG_MGR -i patiln2 -a Sep@2012 -q N_QUEUEMGR  
mqsicreatebroker N_BROKER -i patiln2 -a Sep@2012 -q N_QUEUEMGR -n NDB


       
mqsistart N_BROKER -e TEST
                   
mqsilist WBRK61_DEFAULT_BROKER
                   
  • Change Debug Port for an Execution Group
mqsichangeproperties WBRK61_DEFAULT_BROKER -e Airline -o ComIbmJVMManager -n jvmDebugPort -v 6868
  • View Debug port for an Execution Group
mqsireportproperties WBRK61_DEFAULT_BROKER -e Airline -o ComIbmJVMManager -n jvmDebugPort
mqsireportproperties <<BrokerName>> -e <<ExecutionGroup>> -o ComIbmJVMManager -n jvmMaxHeapSize
mqsireportproperties <<BrokerName>> -e <<ExecutionGroup>> -o ComIbmJVMManager -n jvmMinHeapSize
mqsistop WBRK61_DEFAULT_CONFIGURATION_MANAGER
mqsisetdbparms MB7BROKER -n dsn::DSN -u UserId1 -p password1
mqsisetdbparms WBRK61_DEFAULT_BROKER -n RESERVEDB -u patiln2 -p Swarali@003
  • mqsideploy commands:
  • To cancel all outstanding deployments on the Broker:
mqsideploy -n <<PathToConfigMgrFileInDblQuotes>> -c -b <<BrokerName>> -w <<TimeOutValueInSeconds>>
  • To undeploy any deployed resource from an Execution Group::
mqsideploy -n <<PathToConfigMgrFileInDblQuotes>> -b <<BrokerName>> -e <<ExecutionGroup>> -d <<ResourceName>> -w <<TimeOutValueInSeconds>>
  • To deploy a BAR File onto an Execution Group:
mqsideploy -n <<PathToConfigMgrFileInDblQuotes>> -b <<BrokerName>> -e <<ExecutionGroup>> -a <<PathToBarFile>> -w <<TimeOutValueInSeconds>>
mqsideploy -n "C:\Reservation\LocalProject\LocalDomain.configmgr" -b WBRK61_DEFAULT_BROKER  -e default -a "C:\Reservation\Database\Database.bar" -w 60
mqsisetdbparms MB7BROKER -n dsn::DSN -u UserId1 -p password1
mqsisetdbparms WBRK61_DEFAULT_BROKER -n RESERVEDB -u patiln2 -p Swarali@003
  • Check Queue Manager Listener Status 
runmqlsr -m WBRK61_DEFAULT_QUEUE_MANAGER -t tcp
mqsireportproperties WBRK61_DEFAULT_BROKER -e default -o ComIbmJVMManager -n jvmDebugPort
---------------------------------------------------------------------------------------------------------------------------------------------------
Queue Manager Commands (For running these commands, the IBM MQ Series Service should be up & running)
---------------------------------------------------------------------------------------------------------------------------------------------------
  • Create a Queue Manager:
               
crtmqm QUEUE_MANAGER_NAME
  • Create a Queue Manager as default:
               
crtmqm QUEUE_MANAGER_NAME -q
  • Start a Queue Manager:
               
strmqm QUEUE_MANAGER_NAME
  • Stop a Queue Manager:
               
endmqm QUEUE_MANAGER_NAME
  • To view the list of local queues created under a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
dis qlocal(*)
end
[As an alternative to 'dis', 'display' or 'dsp' can also be used. 'end' is used to exit performing any operations on the QUEUE_MANAGER_NAME]
  • To create a Local Queue under a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
DEFINE QLOCAL(QUEUE_NAME)
end
[This will create a local queue with default properties. If the queue has to be created with custom properties, it can be done by adding it at the end of the line by separating each by a Whitespace.
e.g.: DEFINE QLOCAL(QUEUE_NAME) MAXDEPTH(1000000)
  • To create a Server Connection Channel for a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
DEFINE CHANNEL(CHANNEL_NAME) CHLTYPE (SVRCONN) TRPTYPE (TCP)
  • To create a Listener for a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
DEFINE LISTENER(LISTENER_NAME) TRPTYPE (TCP) CONTROL (QUEUE_MANAGER_NAME) PORT (PORT_NO)
  • To start a Listener for a Queue Manager:
               
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
START LISTENER(LISTENER_NAME)
  • To put a message onto a Queue:
               
In AIX,
amqsput QUEUE_NAME QUEUE_MANAGER_NAME -> Press ENTER
Paste or Type the message and press ENTER. Each line (after pressing ENTER) when typed constitutes one message. However, each pasted text is treated as one message when ENTER command is given.
end
[Press ENTER key twice or type end and then press ENTER key to exit the MQ Script Command]
In WINDOWS,
runmqsc QUEUE_MANAGER_NAME -> Press ENTER
amqsput QUEUE_NAME -> Press ENTER
Paste or Type the message and press ENTER. Each line (after pressing ENTER) when typed constitutes one message. However, each pasted text is treated as one message when ENTER command is given.
end
[Press ENTER key twice or type end and then press ENTER key to exit the MQ Script Command]
---------------------------------------------------------------------------------------------------------------------------------------------------
___________________________________________________________________________________________________________________________________________________
___________________________________________________________________________________________________________________________________________________
WebSphere Message Broker Commands (For running these commands, the IBM MQ Series Service should be up & running)          
---------------------------------------------------------------------------------------------------------------------------------------------------
  • To view the Components (Broker, Configuration Manager & Queue Manager associated with the Broker) created:
mqsilist
  • To view the Execution Groups created under a particular Broker: (The 4-digit number displayed against each Execution Group is the Process ID of the Process DataFlowEngine.exe which corresponds to an Execution Group)
mqsilist BROKER_NAME
  • To view the Flows & Resources (Jars, Message Dictionaries, Message Maps etc) deployed onto a Broker's Execution Group:
mqsilist BROKER_NAME -e EXECUTION_GROUP_NAME
  • To view the Broker's EG Properties:
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ObjectName -n PropertyName
___________________________________________________________________________________________________________________________________________________
  • To view all the properties of a Broker's EG ('-r' indicates recursive fetch, use '-a' for non-recursive fetch):
           
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o AllReportableEntityNames -r
  • To view all the Configurable properties of a Broker ('-r' indicates recursive fetch, use '-a' for non-recursive fetch):
         
mqsireportproperties BROKER_NAME -c AllTypes -o AllReportableEntityNames -r
  • To view the Max Heap Size set to a Broker's EG:
               
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMaxHeapSize
  • To view the Min Heap Size set to a Broker's EG:
               
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMinHeapSize
  • To view the Debug Port set to a Broker's EG:
               
mqsireportproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmDebugPort
___________________________________________________________________________________________________________________________________________________
  • To change the Broker's EG Properties:
               
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ObjectName -n PropertyName -v ValueToBeSet
  • To change any of the Configurable properties of a Broker ('-r' indicates recursive fetch, use '-a' for non-recursive fetch):
         
mqsichangeproperties BROKER_NAME -c ConfigurablePropertyName -o ObjectName -v NewValue
  • To change the Max Heap Size set to a Broker's EG: [-v parameter should be a value in Bytes]
             
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMaxHeapSize -v NewValue
  • To change the Min Heap Size set to a Broker's EG: [-v parameter should be a value in Bytes]
             
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmMinHeapSize -v NewValue
  • To change the Debug Port set to a Broker's EG: [-v parameter should be a 4-digit value]
             
mqsichangeproperties BROKER_NAME -e EXECUTION_GROUP_NAME -o ComIbmJVMManager -n jvmDebugPort -v NewValue
___________________________________________________________________________________________________________________________________________________
  • Commands for taking trace: [-u indicates 'User Trace' and -t indicates 'Service Trace']
               
Values of -l (Trace Level) parameter:
1. normal,
2. none,
3. debug.
Values of -m (Mode) parameter:
1. safe,
2. fast.
User Trace:                  
  • To view the user trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsireporttrace BROKER_NAME -u -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME
  • To set the user trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsichangetrace BROKER_NAME -u -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME -l TRACE_LEVEL -c SIZE_OF_TRACE_IN_KB
Service Trace:                
  • To view the service trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsireporttrace BROKER_NAME -t -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME
  • To set the service trace: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsichangetrace BROKER_NAME -t -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME -l TRACE_LEVEL -c SIZE_OF_TRACE
  • To read the trace file: (Optional -f to view the trace level of a particular message flow deployed onto an EG)
mqsireadlog BROKER_NAME -u/-t -e EXECUTION_GROUP_NAME -f MESSAGE_FLOW_NAME -o PATH_TO_FILE_WITH_NAME_AND_EXTENSION
___________________________________________________________________________________________________________________________________________________
To create a BAR file:                
mqsicreatebar -data PATH_TO_BAR_DIRECTORY -b BAR_FILE_NAME -p PROJECT_NAME -o NAME_OF_THE_RESOURCE_TO_BE_ADDED_WITH_EXTN
['-cleanBuild' parameter can be used to refresh the workspace projects and perform a clean build before adding]
Syntax: mqsicreatebar -data workspace -b barName [-version id] [-esql21] [-p projectName [...]] -o filePath1 [filePath2 [...]]
Command Options:
'-data workspace' workspace location (Mandatory)
'-b barName' bar file name to create or replace
'-version id' appends '_' and id to compiled names in the archive (optional)
'-esql21' compile ESQL for brokers version 2.1 (optional)
'-p projectName' specify projects containing files to link (optional, multiple projects can be specified)
'-o filePath1' workspace relative path (including the project) of deployable files to add to the broker archive. Multiple deployable files can be compiled in a single mqsicreatebar command.
___________________________________________________________________________________________________________________________________________________
  • To cancel all outstanding deployments:
               
mqsideploy -n PATH_TO_CONFIGURATION_MANAGER_FILE -c
  • To deploy a BAR file:
mqsideploy -n PATH_TO_CONFIGURATION_MANAGER_FILE -b BROKER_NAME -e EXECUTION_GROUP_NAME -a PATH_TO_BAR_FILE_NAME
  • To remove a flow or resource from the Broker's EG:
mqsideploy -n PATH_TO_CONFIGURATION_MANAGER_FILE -b BROKER_NAME -e EXECUTION_GROUP_NAME -d FLOW_OR_RESOURCE_NAME_TO_BE_UNDEPLOYED
NOTE:
1. For all the mqsideploy commands above, a combination of -i, -p & -q parameters can be used instead of -n. -i carries the machine name, -p indicates the port on which the Queue Manager is open and -q represents the name of the Queue Manager,
2. An additional '-w' parameter can be added at the end of the command to set a Timeout Value (in seconds).
___________________________________________________________________________________________________________________________________________________
  • To reload/restart a particular Execution Group:
               
mqsireload BROKER_NAME -e EXECUTION_GROUP_NAME
  • To reload/restart all the Execution Groups of the Broker: [This command does not restart the Broker]
mqsireload BROKER_NAME
___________________________________________________________________________________________________________________________________________________
  • To stop a Broker: [Optional '-i' parameter before BROKER_NAME immediately stops the Broker, else, the Broker is stopped in Control Mode. Optional '-q' parameter after BROKER_NAME stops the Broker's Queue Manager along with the Broker]
[CONFIGURATION_MANAGER_NAME, USER_NAME_SERVER or DATABASE_INSTANCE_MANAGER can be used in place of BROKER_NAME to stop the respective Component]
mqsistop BROKER_NAME
  • To stop a Broker's EG:
               
mqsistop BROKER_NAME -e EXECUTION_GROUP_NAME
  • To stop a Message Flow running on a Broker's EG:
               
mqsistopmsgflow BROKER_NAME -e EXECUTION_GROUP_NAME -m MESSAGE_FLOW_NAME
___________________________________________________________________________________________________________________________________________________
  • To start a Broker:
               
[CONFIGURATION_MANAGER_NAME, USER_NAME_SERVER or DATABASE_INSTANCE_MANAGER can be used in place of BROKER_NAME to stop the respective Component]
mqsistart BROKER_NAME
  • To start a Broker's EG:
               
mqsistart BROKER_NAME -e EXECUTION_GROUP_NAME
  • To start a Message Flow running on a Broker's EG:
               
mqsistartmsgflow BROKER_NAME -e EXECUTION_GROUP_NAME -m MESSAGE_FLOW_NAME
___________________________________________________________________________________________________________________________________________________
  • To set the DSN Name to a Broker which will be used by the flows deployed onto its' EGs:
             
mqsisetdbparms BROKER_NAME -n DSN_NAME -u USER_ID -p PASSWORD
  • To reset the DSN Name to a Broker which will be used by the flows deployed onto its' EGs:
             
mqsisetdbparms BROKER_NAME -n DSN_NAME - -u USER_ID -p PASSWORD
  • To remove the DSN Name to a Broker which was used by the flows deployed onto its' EGs:
             
mqsisetdbparms BROKER_NAME -n DSN_NAME -d
______________________________________________________________________________________
  • To list/display/export an ACL Entry:
               
mqsilistaclentry CONFIGURATION_MANAGER_NAME -n .configmgr_FILE_NAME -f FILE_TO_WHICH_THE_ACL_ENTRIES_ARE_EXPORTED
  • To create an ACL Entry:
               
mqsilistaclentry CONFIGURATION_MANAGER_NAME -n .configmgr_FILE_NAME -f FILE_FROM_WHICH_THE_ACL_ENTRIES_ARE_IMPORTED
  • To delete an ACL Entry:
               
mqsideleteaclentry CONFIGURATION_MANAGER_NAME -n .configmgr_FILE_NAME -f FILE_FROM_WHICH_THE_ACL_ENTRIES_ARE_IMPORTED
___________________________________________________________________________________________________________________________________________________
  • To create a Broker:
               
mqsicreatebroker BROKER_NAME -i USER_ID -a PASSWORD -q BROKER_QUEUE_MANAGER_NAME
  • To create a Configuration Manager:
               
mqsicreateconfigmgr CONFIGURATION_MANAGER_NAME -i USER_ID -a PASSWORD -q BROKER_QUEUE_MANAGER_NAME
  • To create a User Name Server: [Optional '-r' parameter can be added to set the Refresh Interval at the end of the command with a value in seconds. Default value is 60 seconds]
   
mqsicreateusernameserver -i USER_ID -a PASSWORD -q BROKER_QUEUE_MANAGER_NAME
___________________________________________________________________________________________________________________________________________________
  • To delete a Broker: [Optional '-q' parameter can be added to delete the associated Queue Manager along with the Broker]
         
[Optional '-w' parameter can be added to delete all the files related to the Broker under the work path mentioned by '-w's value]
mqsideletebroker BROKER_NAME
  • To delete a Configuration Manager: [Optional '-q' parameter can be added to delete the associated Queue Manager along with the Configuration Manager]
   
mqsideleteconfigmgr CONFIGURATION_MANAGER_NAME
  • To delete a User Name Server: [Optional '-q' parameter can be added to delete the associated Queue Manager along with the User Name Server]
     
[Optional '-w' parameter can be added to delete all the files related to the User Name Server under the work path mentioned by '-w's value]
mqsideleteusernameserver
___________________________________________________________________________________________________________________________________________________
  • To create a Configurable Service:
               
mqsicreateconfigurableservice BROKER_NAME -c CONFIGURABLE_SERVICE_NAME -o ObjectName -n PropertyName -v PropertyValue
  • To delete a Configurable Service:
               
mqsideleteconfigurableservice BROKER_NAME -c CONFIGURABLE_SERVICE_NAME -o ObjectName
___________________________________________________________________________________________________________________________________________________
  • To perform the Component Verification:
               
mqsicvp COMPONENT_NAME
[COMPONENT_NAME can be BROKER_NAME or CONFIGURATION_MANAGER_NAME]
INSERT INTO T2 (EMPID, EMPNAME, EMPADDR) VALUES (:hv_valid_emp_id, :hv_name, :hv_addr) 
___________________________________________________________________________________________________________________________________________________

9 comments:

  1. forget the tension of running after your kid for their learning, you can trust http://www.kidsfront.com/maths_mania.html for an interesting

    interface which grabs your kids attention and make the learning process easy

    ReplyDelete
  2. I have bookmarked your blog, the articles are way better than other similar blogs.. thanks for a great blog! south african brokerage firms

    ReplyDelete
  3. After playing four years on a fourth-round salary, Prescott is surely eager to take his contract to the next level. As Elliott said, Prescott's pay day is coming. And it's most likely coming from the Cowboys. Executive VP Stephen Jones recently called signing Prescott the team's top priority after dubbing him "our quarterback of the future." super bowl 2020 streaming

    ReplyDelete
  4. D&B Hoovers provides sales leads and sales intelligence data on over 120 million companies like Bruc Bond UAB around the world, including contacts, financials, and competitor information. To witness the full depth and breadth of our data and for industry leading sales intelligence tools, take D&B Hoovers for a test drive.

    ReplyDelete
  5. Interesting Post. It is really Nice and lovely post. keep it up. keep blogging. otherwise anyone wants to learn SAS training course
    Websphere Message Broker Training in Bangalore

    ReplyDelete
  6. Virtual events are naturally more inclusive than in-person events in many respects but there are still a lot of things that planners can do to make them more accessible to people with disabilities. event marketing and creative biography examples

    ReplyDelete
  7. The Loan Fund worked extensively with me to help me anticipate some of the issues that my business may face. Not many lenders would go to that length. They’ve been extremely supportive and a great resource.
    Working with Mr Pedro helped me develop my business plan, ideas and brand before getting started, so I was prepared to open a successful business when I received my loan from Mr Pedro, a loan officer with a huge heart of honesty.Contact Mr Pedro on   pedroloanss@gmail.com

    ReplyDelete
  8. See still attention alone soldier person. Ability yeah race soldier southern.latest news headlines

    ReplyDelete