WMQ Administration
Topics
Introduction
MQSC commands
MQSC commands for queue managers
MQSC commands for Listeners
MQSC commands for Local queues
MQSC commands for Alias queues
Administration using MQ Explorer
Introduction
MQ Administration tasks include creating, alerting , viewing,
starting and stopping process, clusters and queue manager
objects.
Administrations tasks can be executed using MQ explorer ( GUI)
or command prompt.
MQSC commands
MQSC stands for MQSC scripting.
MQSC commands are used to manage queue manager
objects, including queue manager itself, queues, process
definitions, channels, client connection channels,
listeners, services, namelists, cluster and authentication
information objects.
MQSC commands are supplied to queue manager using
command prompt 'runmqsc'
runmqsc
MQSC commands
Runmqsc command can be invoked in three ways.
Verify command
Verify the mqsc commands. But does not run them.
runmqsc -v <queue manager name >
Runmqsc directly
Runs mqsc commands directly on a local queue manger
runmqsc <queue manager name>
Runmqsc indirectly
Runs mqsc commands on a remote queue manger.
runmqsc -w 30 <remote queue manager>
MQSC commands
Runmqsc (Contd)
Following commands are used in runmqsc prompt to administer queue
manager objects.
DEFINE :- To add a new queue manager object.
ALTER :- To modify attribute of a queue manager and queue manager
object.
DISPLAY:- To list the attribute values for a queue manager object.
DELETE :- To remove an existing queue manager object.
To exit from command prompt, 'end' command can be used.
MQSC commands for queue manager
Displaying queue manager attributes
To display queue manager properties on runmqsc prompt, use
following commands.
DISPLAY QMGR
DISPLAY QMGR ALL
To display a specific queue manager attribute, name the attribute.
DISPLAY QMGR QMNAME
This will display name of queue manger.
Modifying the queue manager attribute
To modify attributes of queue manager specified on runmqsc
prompt, use command alter qmgr with the attribute name.
ALTER QMGR DEADQ(<Queue name>)
MQSC commands for Listeners
Listeners are used to specify the ports associated with queue
manager.
Listeners are used to receive connections from remote queue
managers and clients.
Listeners can be defined using DEFINE LISTENER command in
runmqsc
DEFINE LISTENER(<listener name>) +
TRPTYPE(TCP) PORT(<port number>)
eg:- DEFINE LISTENER(LISTENER01) TRPTYPE(TCP) +
PORT (1415)
By default port 1414 will be associated with a queue manager.
MQSC commands for Listeners
Listener can be started using START LISTENER command in
runmqsc prompt.
START LISTENER(<Listener name>)
Listener can be stopped using STOP LISTENER command in
runmqsc prompt.
STOP LISTENER(<Listener name>)
To check status of listener , DISPLAY LSSTATUS command can
be used.
DISPLAY LSSTATUS(<Listener name>)
MQSC commands for local queues
Copying a local queue.
Properties of another queue can be copied by using like attribute in the DEFINE
QLOCAL statement.
Syntax:
DEFINE QLOCAL(<new local queue > ) +
LIKE(<name of a existing local queue>)
Eg:DEFINE QLOCAL(NEWQUEUE) +
LIKE(EXISITINGQUEUE) +
MAXMSGL(1024)
MQSC commands for local queues
List queue attributes
MQSC command DISPLAY QLOCAL with queue name is used to list
the properties of an existing queue.
Properties can selectively displayed by individually specifying them
Syntax:
DISPLAY QLOCAL(<local queue name>)
DISPLAY QLOCAL(<local queue name> ) MAXDEPTH
To list all the local queues defined on queue manager.
DISPLAY QLOCAL(*)
MQSC commands for local queues
Modifying queue attributes
MQSC command ALTER QLOCAL with queue name is used to modify
the properties of an existing local queue.
Also properties to be modified also is required to be specified with
new values.
Eg:ALTER QLOCAL(<local queue name>) +
MAXDEPTH(1024) DESCR('new description')
MQSC commands for local queues
Clearing local queue
MQSC command CLEAR QLOCAL with queue name is used to clear
off all the messages from a local queue.
Before issuing CLEAR QLOCAL statement, it should be confirmed
that no process are connected to queue.
Eg:CLEAR QLOCAL(<local queue name>)
Deletion of a local queue
MQSC command DELETE QLOCAL is used to delete a existing local
queue.
Eg:DELETE QLOCAL(<queue name>)
MQSC commands for Alias queues
An alias queue provides a way of referring to another queue
indirectly.
Creation of alias queue
MQSC command DEFINE QALIAS is used to define a new alias queue
Name of the alias queue name and name of target object which it
should point are mandatory arguments.
DEFINE QALIAS(<queue name>) + TARGQ(<Target object
name>)
Target objects can be a local queue, remote queue or a topic.
List properties of alias queue
Mqsc command DISPLAY QALIAS is used to list the properties of
alias queue.
Eg:-
DISPLAY QALIAS(<alias queue name>
MQSC commands for Alias queues
Modify alias queue
Mqsc command ALTER QALIAS can be used to modify properties of
alias queue.
Eg:ALTER QALIAS(<queue name>) +
GET(DISABLED)
Delete alias queue
Mqsc command DELETE QALIAS can be used to delete a alias queue
eg:-
DELETE QALIAS(<Alias queue name>)
Administration using WMQ explorer
With WMQ explorer we can do following:
Create and delete a queue manager (on your local machine
only).
Start and stop a queue manager (on your local machine
only).
Define, display, and alter the definitions of WebSphere MQ
objects such as queues and channels.
Browse the messages on a queue.
Start and stop a channel.
View status information about a channel, listener, queue, or
service objects.
View queue managers in a cluster.
Check to see which applications, users, or channels have a
particular queue open.
Administration using WMQ explorer
Create a new queue manager cluster using the Create New Cluster
wizard.
Add a queue manager to a cluster using the Add Queue Manager to
Cluster wizard.
Manage the authentication information object, used with Secure Sockets
Layer (SSL) channel security.
Create and delete channel initiators, trigger monitors, and listeners.
Start or stop the command servers, channel initiators, trigger monitors,
and listeners.
Set specific services to start up automatically when a queue manager is
started.
Modify the properties of queue managers.
Change the local default queue manager.
Invoke the ikeyman GUI to manage secure sockets layer (SSL)
certificates, associate certificates with queue managers, and configure
and setup certificate stores (on your local machine only).
Administration using WMQ explorer
Modify the parameters for any service, such as the TCP port number for
a listener, or a channel initiator queue name.
Start or stop the service trace.
Questions??
19
Thank you
20