Skip to main content

IBM Websphere MQ interview Questions Part 8 - Middleware News

IBM Websphere MQ interview Questions Part 8 - Middleware News
=============================================================


Q1) 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)



Q2) 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



Q3) 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.



Q4) 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.



Q5) What 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.



Q6) 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



Q7) 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



Q8) 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.



Q9) 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.



Q10) 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



Q11) 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



Q12) 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. for eg: the state of all transactions active at the time of checkpoint. Checkpoint record represents the most recent point of consistency between log and data.



Q13) 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 msg seq 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.



Q14) 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.



Q15) 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.



Q16) 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')



Q17) What are Remote events (Not Auth EV, Q Full, Q Srvc Int Ev, 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



Q18) 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.



Q19) 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



Q20) 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



Q21. Command used for browsing messages

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



Q22. 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



Q23. 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.



Q24. 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



Q25. 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.



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

Security exit



Q27. 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.



Q28. 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



Q29. 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



Q30. 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.



Q31. 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

dis chs(qm1.t.qm2) or dis chs(qm2.t.qm1)



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

Connection name (conname)



Q33. 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



Q34. 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



Q35. 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



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

runmqchl, starts the sender/requester channel



Q37. 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



Q38. If the AIX application sends a message to Windows application where do u specify a convert option?

Receiving channel; Convert (YES) in channel definition



Q39. 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



Q40. 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.



Q41. If a channel is defined with TCP then which field will tell you the TCP value?

Transition type while defining channel.TRPTYPE

Comments

adsrerrapop

Popular posts from this blog

IBM Websphere MQ interview Questions Part 5

MQ Series: - It is an IBM web sphere product which is evolved in 1990’s. MQ series does transportation from one point to other. It is an EAI tool (Middle ware) VERSIONS:-5.0, 5.1, 5.3, 6.0, 7.0(new version). The currently using version is 6.2 Note: – MQ series supports more than 35+ operating systems. It is platform Independent. For every OS we have different MQ series software’s. But the functionality of MQ series Default path for installing MQ series is:- C: programfiles\BM\clipse\SDK30 C: programfiles\IBM\WebsphereMQ After installation it will create a group and user. Some middleware technologies are Tibco, SAP XI. MQ series deals with two things, they are OBJECTS, SERVICES. In OBJECTS we have • QUEUES • CHANNELS • PROCESS • AUTHENTICATION • QUERY MANAGER. In SERVICES we have LISTENERS. Objects: – objects are used to handle the transactions with the help of services. QUEUE MANAGER maintains all the objects and services. QUEUE: – it is a database structure ...

IBM Websphere MQ Reason code list / mq reason codes / websphere mq error codes / mq error messages

Reason code list ================= The following is a list of reason codes, in numeric order, providing detailed information to help you understand them, including: * An explanation of the circumstances that have caused the code to be raised * The associated completion code * Suggested programmer actions in response to the code * 0 (0000) (RC0): MQRC_NONE * 900 (0384) (RC900): MQRC_APPL_FIRST * 999 (03E7) (RC999): MQRC_APPL_LAST * 2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR * 2002 (07D2) (RC2002): MQRC_ALREADY_CONNECTED * 2003 (07D3) (RC2003): MQRC_BACKED_OUT * 2004 (07D4) (RC2004): MQRC_BUFFER_ERROR * 2005 (07D5) (RC2005): MQRC_BUFFER_LENGTH_ERROR * 2006 (07D6) (RC2006): MQRC_CHAR_ATTR_LENGTH_ERROR * 2007 (07D7) (RC2007): MQRC_CHAR_ATTRS_ERROR * 2008 (07D8) (RC2008): MQRC_CHAR_ATTRS_TOO_SHORT * 2009 (07D9) (RC2009): MQRC_CONNECTION_BROKEN * 2010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR * 2011 (07DB) (RC2011): MQRC_DYNAMIC_Q_NAME_ERROR * 2012 (07DC) (RC201...

Message Broker (WMB) installation and setup on Linux

Message Broker (WMB) installation and setup on Linux Installing the Binaries As a first step download the trail version of the message broker binaries from IBM site and install them. this part is very simple and process is depends on your operating system. Like for windows, you have .exe file and Linux has rpm and unix you get pkg or other. After installation Set up a broker database [Windows] __ 1. Create the broker database, BRKDB. Open a WebSphere Message Broker Command Console: mqsicreatedb BRKDB This command also establishes the required ODBC connection. _ 2. Verify your user account for the broker database. [Linux] If you are creating Oracle databases for 32-bit brokers on Linux® and UNIX® systems, run the mqsi_setupdatabase command before you create a database. mqsi_setupdatabase– Database–Database_Home_Directory Eg:mqsi_setupdatabase oracle /oracle/product/9i/Db_1 Add $ORACLE_HOME/lib to the end of the MQSI_LIBPATH library search path environment variabl...