Professional Documents
Culture Documents
MQ Interview Q& S Part 4
MQ Interview Q& S Part 4
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 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 ) 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 ) 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 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. 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 . 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 . 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. 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. 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 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