Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

c  How to enable auto-definition of channel definitions

A QM can be configured to automatically create channel objects in response to MCA


connection request. Channel auto definition is enabled for a QM by configuring the
CHAD attribute of QM to ENABLED. CHAD(ENABLED)

c) How to remove a QM from a cluster


A. If the QM you are removing is a repository QM then join a new QM to the cluster
before removing existing full repository QM
B. Set the repository (REPOS) attribute of the QM to blank.
Use ALTER QMGR REPOS (' ')
C. Use SUSPEND QMGR CLUSTER command in mqsc to suspend the QM in the
cluster
D.Inform the QMs in cluster that the QM is leaving the cluster. So, Set the cluster
attribute of that cluster receiver channel object to blank.
ALTER CHANNEL ('To.QM) CHLTYPE(CLUSRCVR) CLUSTER(' ')
E. Issue stop channel command for cluster receiver channel
STOP CHANNEL ('To.QM')
F. Issue a refresh cluster command against the QM for the cluster that the QM is
leaving. This ensures that the information about the cluster is cleared from
repository held by the QM

c) What exactly happens when you issue SUSPEND QM?


Suspending a QM is not the same as removing it from the cluster. The QM will be
still in the machine in running state and you can put and get messages. 'Suspend
QM' tells the workload management routines to avoid sending messages to it. And
its an Advice to other queue managers in the cluster to avoid sending messages to
the suspended qm. This is useful before performing planned maintenance on the
QM to recommend to applications that they do not route messages when it is
unavailable.

c) What exactly happens when you add a QM to cluster?


The QM will become the member of the cluster and can share queue objects within
cluster by using cluster (CLUSTER) or cluster namelist (CLUSNL) attributes. Existing
queue objects can be altered and new ones can be defined. This QM will have the
knowledge of the resources hosted within the cluster without explicit local definition
for those resources.

cWhat do you do when channel goes to RETRY


Channel automatically retries the connection at regular intervals. The behavior is
defined using short retry interval (SHORTTMR), long retry interval (LONGTMR),
short retry count (SHORTRTY) and Long retry count (LONGRTY) attributes of
channel object. After the number of configured retry attempts have been
performed, the channel enters STOPPED status automatically. Then the user has to
issue START command to start the channel manually.

c) Why does a channel go to RETRY STATE?


If an attempt to start the channel has failed then the channel will go to retry state
eg: Listener not running in the receiver side
-wrong ip address is specified in SDR channel definition
-Wrong port address of the listener is mentioned in SDR channel definition



c) Location of log directories
In unix,
If mq is the place where MQ is installed then log files will be in
-System error logs will be in: mq/var/mqm/errors
-QM error log directories (eg: for queue manager QM1):
mq/var/mqm/qmgrs/QM1/errors

c ) How to take MQ backup


Backing up of QM data:
End the queuemanager and take the copies of all the QM data and log file
directories (especially log control file and configuration file) in some other machine
for backup
Using backup QMGR:
An existing queue manager can have a dedicated backup queue manager. A backup
queue manager is an inactive copy of the existing queue manager. If the existing
queue manager becomes unrecoverable due to severe hardware failure, the backup
queue manager can be brought online to replace the unrecoverable queue
manager.

c
) how is recovery different in circular logging and linear logging?
Circular logging stores the log in a ring manner. When all the files are full it goes
back to first file in the ring and starts again. Hence during recovery, any freed files
prior to checkpoint can be reused. The primary log files might eligible for reuse
after filling the current file.
Linear logging keeps log data in a continuous sequence of files. Space is not
reused, so you can always retrieve any record logged in any log extent that has not
been deleted. During recovery, the freed log files are no longer accessed and
become inactive.

c ) How to identify, how many logs are required for QM archiving


The size of the log depends, typically, on the number and size of the persistent
messages the queue manager needs to handle. You can change the number of
primary and secondary log files each time the queue manager starts. You cannot
change the log file size; you must determine it before creating the queue manager.
After deciding whether the queue manager should use circular or linear logging,
you need to estimate the size of the log that the queue manager needs. The size of
the log is determined by the following log configuration parameters:
LogFilePages
The sizes of each primary and secondary log file in units of 4K pages
LogPrimaryFiles
The number of pre-allocated primary log files
LogSecondaryFiles
The number of secondary log files that can be created for use when the primary log
files are full

c ) What is MQ Syncpoint
Sync point coordination is the process by which units of work or either committed
or backed out with data integrity. At the end of transaction messages can be
committed or back out the changes. However it can be more useful for an
application to synchronies data changes at other logical points within the
transaction. These logical points are called sync points


c ) What is MQ CHECKPOINT?
While storing the MQ logs, for easy back-up, checkpoints are used. For example
while logging contents, after 10 transactions get completed a checkpoint is issued.
We can retrieve the stored information from the checkpoint in case of recovery. A
checkpoint is a point in time when the record described in the log is same as record
in queue. Checkpoint itself consists of series of log records needed to restart QM.
foreg: the state of all transactions active at the time of checkpoint. Checkpoint
record represents the most recent point of consistency between log and data.

c ) How to check if you need to commit or rollback a transaction from sequence


nos available in channel status
Both sender and RCVR MCAs maintain sequence number related to number of
messages successfully transferred over the channel.
If we are sending the messages in batches of 50, if the msgseq no is 50, then need
to commit the UOW else roll back. If all the 50 messages in batch has successfully
send through channels and received by the receiving QM then the work should be
committed.

c ) How many types of logs are available in MQ


Two.. Active and archive logs
WebSphere MQ directly uses active logs to log WebSphere MQ changes. When
these logs become full, they are copied to archive logs.
The archive logs can be on tape or on disk. The archive logs are typically created as
disk GDG data sets.
There are two types of logging methods circular and linear.

c ) How many minimum sender-RCVR channels r required for 4 QMs in cluster


Two QM's can act as full repos usually. so they should be tightly coupled.
So all the 4 QMs should have rcv channel with their own ip address. All the QM
should have SDR channel with repos QM's ip address so totally 4 SDR and 4 RCVR
should be defined.

c ) How to define QM Alias


In the remote queue definition,remote name(RNAME),attribute of remote queue
object should be left blank.DEFINE QREMOTE('qm1.alias') RNAME(' ')
RQMNAME('qm1')

c ) What are Remote events (Not Auth EV, Q Full, Q SrvcIntEv, Bridge Started
Ev, Unknown xmit Q Ev)
Remote event indicates that an application cannot access a queue on another
(remote) QM. Like TX to be used is not properly defined.
Other examples:
Unknown TX queue, TX queue usage error, unknown default TX queue, unknown
remote QM

c ) If transmission queue is having some messages on cluster how to clear


Tx queue is used in intercommunication between two QMGRs or cluster QMGRs.
Each cluster queue manager has a cluster transmission queue called
SYSTEM.CLUSTER.TRANSMIT.QUEUE.A queue manager that is part of a cluster can
send messages on the cluster transmission queue to any other queue manager that
is in the same cluster. If there is a failure while sending the message to other
QMGR the messages will get struck in Tx queue if there is no dead letter queue
defined for that QMGR. So the MQPUT (while putting message in the cluster QMGR)
will fail with specific reason code. Depending on the reason code we need to take
action to clear the message from TX. Queue. Failure may occur when the
destination/intermediate QMGR is not up and running or channels between two
QMGRs is not up etc. You cannot directly put message to TX queue.

c
) If dead letter queue is having messages with no reason code how can you
take decision?
I guess there is no scenario without the reason field in MQDLH. The Reason field of
the MQDLH structure contains a reason code that identifies why the message is on
the DLQ. When the queue manager puts a message on this queue, it adds a header
to the message, the format of which is described by the dead-letter header
(MQDLH) structure. This header includes the name of the target queue and the
reason the message was put on the dead-letter queue

MQDLH contains,
The message can be identified as having a dead-letter queue header because the
value of the format field in the MQMD, is MQFMT_DEAD_LETTER_HEADER.
The reason for the message to be routed to the dead-letter queue is contained in
the Reason field of the dead-letter queue header.
The dead-letter queue header contains details of the destination queue name and
queue manager name.
The message descriptor is the same as PUT by the original application, except for
Encoding, CodedCharSetId and Format

c ) How to change the log files type and log file size.
You can change the number of primary and secondary log files each time the queue
manager starts.
You cannot change the log file size or logfile type you must determine it before
creating the queue manager!!!
-lf LogFileSize parameter in crtmqm will determine the size
-lc Use circular logging. This is the default logging method in crtmqm option
-ll for linear logging

c . Command used for browsing messages


MQGET call with open option "browse" is used to browse message sin the queue.

c. QMGR Q1 in london and Qmr2 in paris forms a cluster. For adding QMGR3 in
washington into the cluster how many more channels need to be created in QMGR1
and QMGR2?
No need of channel creation in QM1 and QM2.Sender channel and RCVR channel
should be set for only QM3

c. When the 2 repositories go down what happens to other queue managers in
the cluster.
They will be running. But we cluster concepts wont work. You cannot put message
to remote QMGR using the clusters.

c. Two channel are defined with same xmitq, when one channel is started what
happens when you try to start the other.
Only one channel will up at a time if they both share a same xmitq. If the second
channel is started the already running first channel will go to "retry" status


c. To find out the status of a remote queue manager what command is used?
runmqsc -w is for checking remote runmqsc, if it fails then that QMGR may not be
in running status.

c. Which exit is used to check if the user is trusted party?


Security exit

c. Two applications running on Queue managers are connected to 2 remote


Queue managers via two Xmit Queues. Channels are running at ful capacity. How
can we increase the performance?
Resourse that is shared becomes a bottleneck. So distribute the application prgs
into different cpus. Run one program in one cpu and the other in the other cpu. Or
use same tx queue for two channels. So if one application uses that channel, the
other appln could not use since its channel (link) is not up.

c . MQGET fails and the message is still in the Queue. What command is used to
find the error caused?
In general reason codes will be generated for every API call, to find the reason
failure of that API call. Depending on the reason code, we can check whether QMGR
is running or queue exists. This related to MQ programming and not to MQ
sysadmin

c
. Three QMGRs Q1 Q2 Q3. There is no connection between Q1 and Q2. A
message is put into Q1 and it has to reach Q3 via Q2. (Multi Hopping) Now the link
between Q2 and Q3 is down. What happens to the message?
The message will be in intermediate QMGR Q2 if link between QM2 and QM3 breaks

c . Command Used to find the message length?


maxmessage length of a queue can be found by sysadmin command. But length of
the message put in a queue can be find only by API calls. Message length attribute
of message descriptor holds the length of message.

c . Channels defined btwn qm1 and qm2 are qm1.t.qm2 & qm2.t.qm1. How to
know the link status
Channel status command checks the status of channels. If it is "running", then
there is a proper link between two channels
dischs(qm1.t.qm2) or dis chs(qm2.t.qm1)

c. How to define for port xxxx, in channel definition


Connection name (conname)

c. How do you define when a message on a Queue to be shared on Qmanagers


QM1, QM2 and QM3?
Put the message in a cluster queue if all the 3 managers are in cluster

c. When a channel is running, if it fails suddenly, what command u use to roll
the back the messages which are in Transmission Queue?
Messages should be put in unit of work; MQBACK api call will roll back the message
put in queue

c. When we try to put a message on a Queue and if it fails, with saying as
Queue is in use. Which command u use to find which application uses this Queue?
Display qstatus(queue name) type(handle)
When you give this command, opprocs value will be '1', if single application is using
that queue. So one application is using that queue

c. What is the command in Unix to directly run the Channel?


runmqchl, starts the sender/requester channel

c. If the channel has to stop after 1 hour how do u define Disconnect interval?
Disconnect interval in mille second. Search for (DSCINT) attribute of a channel

c . If the AIX application sends a message to Windows application where do u


specify a convert option?
Receiving channel; Convert (YES) in channel definition

c
. If MQseries wants to know the conversation obtained by Sending application
sends a message to Server, which option you use in message descriptor?
MQGMO_CONVERT option is specified in the Options field of the MQGMO structure
passed to an MQGET call

c . When a message sending from one channel to another and if the message
needs to be changed in header of the message where do u change it?
User cannot change the message header, system will automatically change it.
Message header contains msgid and correlation id generated by system.

c . If a channel is defined with TCP then which field will tell you the TCP value?
Transition type while defining channel.TRPTYPE

You might also like