Tuesday, April 27, 2010

MQ Interview questions

What is MQ?

MQ stands for Message queuing. MQ allows application programs to use the message queuing to participate in message-driven processing.

what are the advantages of MQ?

  • Integration
  • Asynchrony
  • Assured delivery
  • Scalability
What is the format of the command "dspmqver"?

Version.release.modification.fixpack.
6.0.2.7

What is a user exit in terms of MQ?

Using these user exits, we can insert our code into the queue manager function.

What are the logging configuration files?

mqs.ini - config file for mq level settings
qm.ini - config file for queue manager level settings


What is the algorithm used in MQ for ensuring integrity?

Log write integrity is the algorithm used to ensure integrity. This can be changed in QM config file


When a queue manager starts, what are the default components that start with the Queue manager?

The Queue Manager task:

  • LOGGER-IO
  • ERROR-LOG
  • CHECKPOINT
  • ASYNCQ
  • EXPIRER
  • STATISTICS
What is the communication protocol used by MQ Explorer to connect to the remote QMs?

TCP/IP Protocol


What is a Channel?

Channel can be depicted as a pipe/connection for communication between queue managers to exchange messages.

What are various types of channels in MQ v6?

  • Sender(SDR)
  • Receiver(RCVR)
  • Cluster Receiver(CLUSRCVR)
  • Cluster Sender(CLUSSDR)
  • Server(SVR)
  • Requester(RQSTR)
  • Client Connection(CLNTCONN)
  • Server connection(SVRCONN)

What is the purpose of Channel Initiator in MQ?
monitor the system-defined initiation queue SYSTEM.CHANNEL.INITQ




Channel Listener - listens for any incoming network requests and starts the appropriate receiver channel.



What are the types of Queues available in MQ V6?

  • Local
  • Alias
  • Remote
  • Model - dynamic queues that are created on the fly by the applications
  • Cluster queue

What are the types of logging in MQ?

  • Circular -lc
  • Linear - ll

Inorder to instruct Websphere MQ to advance/write to a new linear log, "RESET QMGR TYPE(ADVANCELOG)"

In order to recover a queue from a media failure, what type of logging combined with messaging should be?
ans. Linear logging with persistent messaging

Name the log control file in MQ v6?

Log control file is amqhlctl.lfh

Default location of logs
  • UNIX: /var/mqm/log/
  • Windows: C:\Program Files\IBM\WebSphere MQ\log\
Log Defaults in UNIX:
  • LogPrimaryFiles=3
  • LogSecondaryFiles=2
  • LogFilePages=1024
  • LogType=CIRCULAR
  • LogBufferPages=0
  • LogDefaultPath=/var/mqm/log
What is a dead-letter queue handler? How do you invoke it?

runmqdlq - command to start the DLQ handler(monitor & handle messages in DLQ)








dead letter queue handler can be used to both select a message and perform various actions on that message. The runmqdlq command takes its input from stdin. When the command is processed, the results and a summary are put into a report that is sent to stdout. By taking stdin from the keyboard, you can enter runmqdlq rules interactively.



What is a MCA?

A Message Channel Agent(MCA) - sits at each end of the channel controlling the sending and receiving messages. MCA takes the messages from the transmission queue and puts them on the communication link(channel) between the queue managers.

What is an Initiation queue?

Queues that are used in triggering. A message is put by the queue manager on the initiation queue when the trigger event occurs


What is a Command Server in Websphere MQ z/OS?

Command Server is a component of Websphere MQ that works with command processor component.
Reads messages from system-command input queue, verifies them, passes the valid ones as commands to the command processor
command processor processes the message and replies back to the reply-to queue that is specified.

System command input queue -> SYSTEM.COMMAND.INPUT
SYSTEM.ADMIN.COMMAND.QUEUE
reply-to queue -> SYSTEM.COMMAND.REPLY.MODEL











Security/Authorization

Authorization for using MQI calls, commands and access to objects is provided by the Object Authority Manager (OAM). The “setmqaut” command is used to grant or revoke authorizations as required.
A security refresh is required after setmqaut commands are issued. This can be done by recycle of QMGR to refresh the security cache or
by runmqsc command “refresh security(*) all”
“dspmqaut” and “dmpmqaut” can be used to view authorities.

Thursday, April 15, 2010

Monday, April 12, 2010

Triggering in MQ v6

1. Define a local queue by name TESTTRIG under the Queue Manager QM.ROH as follows:

DEFINE QLOCAL('TESTTRIG') DESCR('To test how the property trigger works')

1 : DEFINE QLOCAL('TESTTRIG') DEFPSIST(YES) DESCR('To test how the propert
y trigger works')
AMQ8006: WebSphere MQ queue created.



2. Create a process that needs to be invoked with the trigger.

DEFINE PROCESS(process_name)
[ APPLICID(string) ]
[ APPLTYPE( CICS | DEF | DOS | OS2 | UNIX | WINDOWS | WINDOWSNT |
NOTESAGENT | OS400 | integer) ]
[ DESCR(string) ]
[ ENVRDATA(string) ]
[ LIKE(process_name) ]
[ REPLACE | NOREPLACE ]
[ USERDATA(string) ]


Example:


DEFINE PROCESS('IE') DESCR('Internet explorer') APPLTYPE(WINDOWS) APPLICID('iexplore')
5 : DEFINE PROCESS('IE') DESCR('Internet explorer') APPLTYPE(WINDOWS) APPLI
CID('iexplore')
AMQ8010: WebSphere MQ process created.



DISPLAY PROCESS('IE')

6 : DISPLAY PROCESS('IE')
AMQ8407: Display Process details.
PROCESS(IE) APPLTYPE(WINDOWS)
APPLICID('iexplore')
ENVRDATA( ) USERDATA( )
DESCR(Internet explorer) ALTDATE(2010-04-12)

ALTTIME(14.09.48)




3. Created a Queue to use as an Initiation queue

DEFINE QLOCAL('trig.initq') descr('initiation queue for triggering ie')
5 : DEFINE QLOCAL('trig.initq') descr('initiation queue for triggering ie')

AMQ8006: WebSphere MQ queue created.

Enable triggering on hosting a queue "TESTTRIG"




4. ALTER QLOCAL('TESTTRIG') TRIGGER TRIGTYPE(FIRST) INITQ('trig.initq') PROCESS('IE')
6 : ALTER QLOCAL('TESTTRIG') TRIGGER TRIGTYPE(FIRST) INITQ('trig.initq') PR
OCESS('IE')
AMQ8008: WebSphere MQ queue changed.

DISPLAY QLOCAL('TESTTRIG')




5. The most important part is to START the MQ TRIGGER MONITOR and let this trigger monitor run till you need the queue to trigger the application.


C:\IBMWMQ\WebSphereMQ\bin>runmqtrm -m QM.ROH -q trig.initq
5724-H72 (C) Copyright IBM Corp. 1994, 2004. ALL RIGHTS RESERVED.
WebSphere MQ trigger monitor started.

__________________________________________________
Waiting for a trigger message




6. Now start putting the messages in the queue TESTTRIG and notice that with every first occurence of the message in the queue manager QM.ROH, the internet explorer application opens up.





Sunday, April 11, 2010

Record(rcdmimg) & Recreate(rcrmqobj) objects in MQ v6

My websphere MQ install directory on windows machine is C:\IBMWMQ\WebSphereMQ\

1. Started MQ explorer through command prompt using "runmqcfg"

2. Created a Queue manager QM.ROH -> crtmqm -q -d QM.ROH.Q.TRANQ -u QM.ROH.Q.DLQ QM.ROH with logging option "LINEAR LOGGING"

3. Created a local queue under the QM.ROH -> QM.RECD.REC

Set the message persistence on the queue so that messages are not lost at the restart of the queue manager.

4. Started putting the messages in QM.Q.RECD.REC -> amqsput QM.Q.RECD.REC QM.ROH

5. Deleted the "Q" file under C:\IBMWMQ\WebSphereMQ\data\Qmgrs\QM!ROH\queues\QM!ROH!QM!Q!RECD!REC\Q to verify the record and recreate commands provided in MQ V6

6. Stopped and restarted the Queue Manager QM.ROH using
endmqm QM.ROH
strmqm QM.ROH

C:\IBMWMQ\WebSphereMQ\bin>strmqm QM.ROH
WebSphere MQ queue manager 'QM.ROH' starting.
11 log records accessed on queue manager 'QM.ROH' during the log replay phase.
Log replay for queue manager 'QM.ROH' complete.
Transaction manager state recovered for queue manager 'QM.ROH'.
WebSphere MQ queue manager 'QM.ROH' started.


7. After having deleted the Q file for queue QM.ROH.Q.LOCALQ, when we try to view the messages in the queue QM.Q.RECD.REC,
  • MQ explorer throws the error message "Object damaged. AMQ4038"

  • When we do it through command line, the following error is displayed. C:\IBMWMQ\WebSphereMQ\bin>amqsbcg QM.Q.RECD.REC

AMQSBCG0 - starts here ********************** MQOPEN - 'QM.Q.RECD.REC' MQOPEN failed with CompCode:2, Reason:2101 MQDISC

8. To display the reason code in understandable format, use "mqrc" command

C:\IBMWMQ\WebSphereMQ\bin>mqrc 2101
2101 0x00000835 MQRC_OBJECT_DAMAGED

You can see that the queue manager error log(AMQERR01.log) contains the following information.
-------------------------------------------------------------------------------
4/12/2010 10:54:55 - Process(2272.1) User(skamani) Program(amqzxma0.exe)
AMQ7472: Object QM.Q.RECD.REC, type queue damaged.

EXPLANATION:
Object QM.Q.RECD.REC, type queue has been marked as damaged. This indicates
that the queue manager was either unable to access the object in the file
system, or that some kind of inconsistency with the data in the object was
detected.
ACTION:
If a damaged object is detected, the action performed depends on whether the
queue manager supports media recovery and when the damage was detected. If the
queue manager does not support media recovery, you must delete the object as no
recovery is possible. If the queue manager does support media recovery and the
damage is detected during the processing performed when the queue manager is
being started, the queue manager will automatically initiate media recovery of
the object. If the queue manager supports media recovery and the damage is
detected once the queue manager has started, it may be recovered from a media
image using the rcrmqobj command or it may be deleted.
----- amqaocua.c : 549 --------------------------------------------------------

9. Inorder to retrieve or create the object from the logs, we should first be recording the image through the "rcdmqimg" command and then use the "rcrmqobj" command to recreate the object as follows

9a) rcdmqimg -> Record an object in the log

record image for Queue manager-> rcdmqimg -m QM.ROH -l -t qmgr *

record image for Queue under the queue manager QM.ROH
C:\IBMWMQ\WebSphereMQ\bin>rcdmqimg -m QM.ROH -z -l -t queue QM.Q.RECD.REC

When you execute this command, you can find the following entry in the respective Queue Manager error log at C:\IBMWMQ\WebSphereMQ\data\Qmgrs\QM!ROH\errors\AMQERR01.log

-------------------------------------------------------------------------------
4/12/2010 10:54:54 - Process(2272.1) User(skamani) Program(amqzxma0.exe)
AMQ7467: The oldest log file required to start queue manager QM.ROH is
S0000001.LOG.

EXPLANATION:
The log file S0000001.LOG contains the oldest log record required to restart
the queue manager. Log records older than this may be required for media
recovery.
ACTION:
You can move log files older than S0000001.LOG to an archive medium to release
space in the log directory. If you move any of the log files required to
recreate objects from their media images, you will have to restore them to
recreate the objects. An older log file is one with a numerically smaller log
number (but allowing for log number wrapping at 9999999).
-------------------------------------------------------------------------------


Media image for object QM.ROH, type qmgr recorded.
AMQ7467: The oldest log file required to start queue manager QM.ROH is S0000000.
LOG.
AMQ7468: The oldest log file required to perform media recovery of queue manager
QM.ROH is S0000000.LOG.


Record image for Queue -> rcdmqimg -m QM.ROH -l -t queue QM.ROH.Q.LOCALQ

Note: Object will be recorded to the log file and no file would be generated.


9b) rcrmqobj -> recreate an object or group of objects from their images

Recreate local queue QM.Q.RECD.REC under the qmgr QM.ROH
C:\IBMWMQ\WebSphereMQ\bin>rcrmqobj -m QM.ROH -z -t queue QM.Q.RECD.REC
Object QM.Q.RECD.REC, type queue recreated.

The Q file for the Local queue QM.Q.RECD.REC was recreated and could browse through the messages in the queue through MQ Explorer or through the amqsbcg command.


other examples:
Recreate local queues under the default queue manager
rcrmqobj -t ql *


Linear Logs Vs Circular Logs in MQ V6

Thursday, April 1, 2010

What is a profile in WAS terms?

  • A profile is the set of files that define the WebSphere® Application Server runtime environment. At least one profile must exist to run the WebSphere Application Server.
  • A feature pack extends the functionality of the WebSphere Application Server in a particular technology, for example the Feature Pack for Web services.
After completing the installation of a feature pack on a WebSphere Application Server, such as upgrading the server with the Feature Pack for Web services, a feature pack might require you to augment a profile to make it compatible with a feature pack. The Profile Management tool is a WebSphere Application Server tool which manages profiles.

WAS Admin interview questions

ICE-BREAKER QUESTIONS

1. Brief me about your profile (Academics, Current Company – Designation – Role
and Websphere activities)
2. Which Versions of WAS you have worked on?? Expect some more questions on
enhancements from WAS V5 to V6 to V7
3. Which versions of WAS you have in your current organization? What are latest
Refresh Pack and Fix Packs available for V6.0/6.1/7.0?
4. How many (physical) WAS servers and how many application/environments you
are currently supporting?
5. WAS architecture/topology in current org??
6. List out internal components of WAS
7. Production Support?? L1/L2/L3?? Which ticketing tool is being used?
8. How do you escalate?
WAS Questions
9. How do you install WAS?
10. How do you upgrade WAS (Refresh Pack and Fix Pack installation)?
11. What’s a profile? Different types of profiles?
12. How do you know the version of WAS?
13. versionInfo.sh Vs historyInfo.sh
14. Whats a managed Node?
15. How do you federate a Node to DMGR?
16. What’s default SOAP Port of DMGR?
17. How to start/stop DMGR/Nodeagent/Instance?
18. What’s the ideal order to start/stop DMGR/Nodeagent/Instances? Are there any
dependencies among them?
19. How do you deploy Applications?
20. Important steps in Application Deployment
21. Define EAR/WAR
22. What’s ContextRoot and Deployment Descriptor?
23. What’s Plugin and how do you install?
24. What are the contents of plugin-cfg.xml?
25. What’s VirtualHost?
26. List out various logs available in WAS environment
27. How do you enable trace?
28. In how many ways you can administer/configure/operate WAS?
29. List out the objects available in wsadmin
30. What’s Sync and FullSync? How do you Sync a Node?
31. What’s Garbage Collection?
32. What’s classloader? Modes? Policies?
33. What’s session management? Session Persistence? Session Affinity?
34. JDBC Provider? Driver Types?
35. Connection Pool settings: Max, Min, Connection TimeOut, Aged time, unused
time, Reap time, Purge Policy
36. How do you configure Global Security?
37. List out user registries supported by WAS
38. Minimum details required to configure Global Security with LDAP
39. Vertical Clustering Vs Horizantal Clustering
40. How do you create Clusters
41. Core Dump/Thread Dump?? Heap Dump?
42. What will be your approach when an application hangs?
IHS Questions
43. How do you install IHS?
44. How to start/stop IHS instance?
45. How to check the syntax of httpd.conf?
46. How do you configure SSL for IHS?
47. Browser Error codes – 200, 300, 400?
48. What’s a DMZ?



UNIX/LINUX Questions

49. Command to list out all running JAVA processes
50. How do you terminate/kill a process listed above
51. How to copy plugin-cfg.xml from WAS machine to IHS machine
52. How to list all the ports in use and their status
53. How to find the process to which a port is bound to
54. How to mount/unmount?
55. Which tools do you use to connect to remote Unix/Linux/Windows servers
56. How to remove a directory and its subfolders?
57. How to change ownership and access permissions
58. How to find differences between two text files?
59. How to find Filesystem space?
60. How to find the usage details or folder sizes?
61. How do you search a file?
62. How do you rename a file?
63. How do you view last few lines of a text file (for ex. SystemOut.log)
64. How do you compress/uncompress?
65. VI editor: Quit? Save Quit? Quit without save? Search a keyword? Substitute a
word?

WebSphere Application Server Library

This is one good place for the documentation of all WAS versions so far…

http://www-01.ibm.com/software/webservers/appserv/was/library/


WebSphere Application Server V6.1: Technical Overview

http://www.redbooks.ibm.com/redpapers/pdfs/redp4191.pdf


IBM Education Assistant

http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp

WebSphere Application Server Administration Using Jython
http://www.ibmpressbooks.com/bookstore/product.asp?isbn=0137009526w


IBM HTTP Server User's Guide
ftp://ftp.software.ibm.com/software/webserver/appserv/library/v60/ihs_60.pdf


WebSphere Application Server V6.1: System Management and Configuration

http://www.redbooks.ibm.com/redbooks/pdfs/sg247304.pdf


IBM WebSphere Application Server V6.1 Security Handbook

www.redbooks.ibm.com/redbooks/pdfs/sg246316.pdf


WebSphere Application Server V6.1: Planning and. Design

www.redbooks.ibm.com/redbooks/pdfs/sg247305.pdf


WebSphere Application Server Network Deployment V6: High Availability Solutions

http://www.redbooks.ibm.com/redbooks/pdfs/sg246688.pdf


WebSphere Application Server V6 Problem Determination for Distributed Platforms

http://www.redbooks.ibm.com/redbooks/pdfs/sg246798.pdf


WebSphere Application Server V6.1: JMS Problem Determination

http://www.redbooks.ibm.com/redpapers/pdfs/redp4330.pdf