Wednesday, May 20, 2015

MQ Script and commands

-------------------------create queues---------------------------------------

DEFINE QLOCAL(STOCK.TRADE.IN)
DEFINE QLOCAL(STOCK.TRADE.OUT.STD)
DEFINE QLOCAL(STOCK.TRADE.OUT.PREMIER)

-------------------------create queues---------------------------------------

Tuesday, May 19, 2015

MQ INTERVIEW QUESTIONS

Q) What happen to messages (persistence& non persistence) if destination queue is full if there is no dead letter queue?
A) PERSISTENT: if queue is full, msg are coming back to xmitq and channel will be going to retrying state.
NON-PERSISTENT: That type of msg’s are discarded
.
..Q) What are the reasons for getting messages in dead letter queue?
A) 1.if queue is full
2. Queue put inhibited.
3.Mag’s length is exceeded
Q) Why we go for clustering?
1.simplifying system administration
2.work load management
3.less no of qm objects like rqd, channels.
4.high availability
Q) What is difference between distribution and clustering?
A).. in distributions queing we have to create more no of objects like remoteqs. transmission ques and sender, reciever channels for every remote queue manager.
in clustering we can logically connect queue managers with the creation of less no.of qmgr objects .
.Q) How do you convert linear to circular?
A) . There is no such option available still there is an work around to activated it, pls perform below tasks if you want to change.
1. First stop the channels
2. Stop the Qmgr
3. Take the back up of qmanager using save queue manager
4. Delete the Qmgr
5. Recreate it with linear logging
6. Recreate all the queue definitions and give the permission to the queues

Q). What is a Trigger monitor?
A) A trigger monitor is a continuously – running program that serves one or more initiation queues.
- When a trigger message arrives on an initiation queue, the trigger monitor retrieves the message.
-The trigger monitor uses the information in the trigger message. 
- It issues a command to start the corresponding application/channel.
.Q) What are the attributes required for the Remote Queue Definition?
Ans: 1.Name of the Queue
2. Transmission Queue Name.
3. Remote QueueManager name 
4. Remote Local Queue Name
.
..Q. What are the Difference B/W Predefined & Dynamic Queues?
Ans: Queues can be characterized by the way they are created:
1. Predefined queues are created by an administrator using the appropriate MQSC or PCF commands. Predefined queues are permanent; they exist independently of the applications that use them and survive Web Sphere MQ restarts.
2 Dynamic queues are created when an application issues an MQOPEN request specifying the name of a model queue. The queue created is based on a template queue definition, which is called a model queue.

Q). What are different modes in which a application can connect to a Queuemanager?
Ans: 1.Binding mode: In binding mode, also known as server connection, the communication to the queue manager utilizes inter-process communications. One of the key factors that should be kept in mind is that binding mode is available only to programs running on the MQSeries server that hosts the queue manager. A program using binding mode will not run from an MQSeries client machine. Binding mode is a fast and efficient way to interact with MQSeries. Certain Facilities, such as XA transaction co-ordination by queue manager, are available only in binding mode.
2. Client Connection: Client connection uses a TCP/IP connection to the MQSeries Server and enables communications with the queue manager. Programs using client connections can run on an MQSeries client machine as well as on an MQSeries server machine. Client connections use client channels on the queue manager to communicate with the queue manager. The client connection does not support XA transaction coordination by the queue manager
Q) Is It Possible to use one transmission Queue for the multiple message channels?
Ans: It is possible to define more than one channel per transmission queue, but only one of these channels can be active at any one time. This is recommended for the provision of alternative routes between queue managers for traffic balancing and link failure corrective action. A transmission queue cannot be used by another channel if the previous channel to use it terminated leaving a batch of messages in-doubt at the sending end.
Q) Is there is any chance for the Message lost?
.Q) What is the command used to test whether the channel is active or not?
.
.
.
.
.
.
.
..
.
.
Ans: runmqsc QMName
Ping channel (channel name).
.
.
.
..
Ans: If the target queuemanager doesn't contain the dead letter queue defined and if the messages are running on a fast channel and of non persistant,Then there is a chance of the message loss.