Answers for MQ Interview Questions
May 5, 2018 | Author: chlaxmikanth | Category: N/A
Short Description
Download Answers for MQ Interview Questions...
Description
Answers for MQ interview questions 2) How to enable auto-defini auto -definition tion of o f channel definitions A QM can be configured to automatically create channel objects in response to MCA connection request Channel auto definition definition is enabled enab led for a QM by configuring con figuring the CHAD attribute of QM to ENABLED CHAD(ENABLED) 3) How to remove a QM from a cluster 1.If the QM you are removing is a repository QM then join a new QM to the cluster before removing existing full repository QM 2.Set the repository(REPOS) attribute of the QM to blank Use ALTER QMGR REPOS(' ') 3.Use SUSPEND QMGR CLUSTER command co mmand in mqsc to suspend the QM in the cluster 4.Inform the QMs in cluster that the QM is leaving the cluster.So, Set the cluster attribute of that cluster receiver channel o bject to blank. ALTER CHANNEL('To.QM) CHLTYPE(CLUSRCVR) CLUSTER(' ') 5.Issue stop channel command for cluster receiver channel STOP CHANNEL('To.QM') CHANNEL('To.QM') 6.Issue a refresh cluster command against the QM for the cluster that the QM is leaving.This ensures that the information about the t he cluster is cleared from from repository held by the QM 4) What exactly happens when you issue SUSPEND QM Suspending a QM is not t he 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 ot her queue managers in the cluster c luster to avoid sending messages to the suspended qm. THis is useful before performing planned mainatenance on the QM to reco mmend to applications that they do not route messages when it is unavailable. 5) 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 o f the resources hosted within the cluster without explicit local definition for those resources. 7) What do you do when channel goes to RETRY channel automatically retries the connection at regular intervals.The behaviour is defined using short retry intervel(SHORTTMR),long retry intervel(LONGTMR), short retry count(SHORTRTY) and Long retry count(LONGRTY) attributes of channel object. AFter the number of configured re try attempts have been performed,the channel enters
STOPPED status automatically.THen the user has to issue START comand to start the channel manually. 8) Why does a channel go to RETRY state If an attempt to start the channel has failed then the channel will goto 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 chl definition 10) 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 11) How to take MQ backup Backing up of QM data: End the queuemanager and take the copies of all the QM data and logfile 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.
12) 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 continious sequence of files.space is not reused,so you can always retrive 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. 13) 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 deter mine it before creating the queue m anager. 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 size of each primary and secondary log file in units of 4K pages LogPrimaryFiles The number of preallocated primary log files LogSecondaryFiles The number of secondary log files that can be created for use when the primary log files are full 14) What is MQ Syncpoint Syncpoint cordination is the process by which units of work or either commited or backed out with data integrity. At the end of transaction messages can be commited or back out the changes. However it can be more useful for an application to synchronise data changes at other logical points within the transaction. These logical points are called syncpoints 15) 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 i s issued. We can retrive 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. chkpoint record represents the most recent p oint of consistency between log and data. 17) How to check if you need to commit or rollback a transaction from sequence nos avai lable 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 succefully send through channels and received by the receiving QM then the work should be commited. 18) 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. 20 ) How many minimum sender-rcvr chnls r reqd 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. 21 ) 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') 22) 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 Q.) can we create replica of any Queue manager? I mean, If is there any command to take a backup of QM and its Objects. and run some command with the backup to create new Queue Manager same as old one and it's all objects ( queue, channels, Process definitions, etc)should be created automatically.
R eplica
of existing QM
As far as I know,we can create a backup QM w ith the same objects as of existing QM. But only one QM should be in running state at a time.THis can be done only when linear logging is used.A backup queue manager is an inactive copy of the existing queue manager. 1.crtmqm backupqm 2.Take copies of data and log file directories of existing QM andoverwrite backup QM's logfiles with existing QM's logfiles 3.use strmqm -r backupqm This command replays all the copied log extents to bring the backup queue manager in step with the existing queue manager.But the backup queue manager is not started.WebSphere MQ updates the backup queue manager's objects by reading the queue manager log and replaying updates to the object files. 4.strmqm -a backupqm Activate the specified backup queue manager. The backup queue manager is not started now also.The requirement to activate a backup queue manager prevents accidental startup. 5.strmqm backupqm Once activated, a backup queue manager can be started using the above command and backup queue manager can no longer be updated.
View more...
Comments