Skip to main content

IBM Websphere MQ Saveqmgr - Middleware News

Building saveqmgr
-------- --------

Sample makefiles are included:

makefile.linux-- for building an Linux version of the executable (add -m31 for 64 bit linux on zSeries, see makefile)
makefile.aix  -- for building an AIX version of the executable.
makefile.solaris -- for building a aSolaris version of the executable.
makefile.hp -- for building a HP/UX version of the executable.
makefile.windows   -- for building a Windows  version of the executable.
makefile.win64   -- for building a Windows 64-bit version of the executable.
makefile.hpnss - for building a Tandem NSK version of the executable.
makefile.compaqtru64unix - for building an Compaq Tru64 Unix version of the
                 executable (Thanks to Ralph Beckers for support)
Descrip.mms   -- for building an OpenVMS version of the executable using MMS.
Make_savqmgr.com -- for building an OpenVMS version of the executable without MMS.

makefile.os400 is no longer included in this package.  See the AS400READ.ME file in ms03_iseries.zip for details.

Edit the makefile for your platform (ie makefile.windows) and
ensure the variables point to the correct directories, etc.

On UNIX, issue: "make -f makefile.xxx", where xxx is the extension
for the platform you are compiling on.

To recompile on Windows or Win-64, issue: "nmake -f makefile.windows" or
"nmake -f makefile.win64"


Hints:
------

You can use the -c flag together with sed to customize your output file.
Suppose you want to delete all lines that contain the attribute NPMCLASS,
try running:

./saveqmgr.linux -c | sed 's/^ *NPMCLASS.*/* skipping npmclass/' > saveqmgr.tst

If you want to change all local queues to a maxdepth of 640000, try:

./saveqmgr.linux -c | sed 's/^ *MAXDEPTH.*/  MAXDEPTH(640000) +/' > saveqmgr.tst

You get the idea...

You can automate the savings of all your qmgrs on a machine with this (for linux):

dspmq | grep 'STATUS(Running)' | sed 's/QMNAME(\(.*\)) *STATUS.*/\1/' | xargs -i ./saveqmgr.linux -f {}.mqsc -m {}

With V6 of MQ, you can create a SERVICE object to automatically run saveqmgr when the qmgr itself starts:

DEFINE SERVICE ('Ms03') DESCR('Run saveqmgr when qmgr starts') STARTCMD('c:\ms03\saveqmgr.exe') +
       STARTARG('-m +QMNAME+ -f c:\temp\+QMNAME+.mqsc -o') STDOUT('c:\temp\ms03.stdout') +
       STDERR('c:\temp\ms03.stderr') CONTROL(STARTONLY) SERVTYPE(COMMAND) REPLACE

Here's a little script to delete all the queues that begin with AMQ (even the PERMDYN ones):

export QM=WBRK_QM
./saveqmgr.linux -m$QM -1 -p -c |  grep \(\'AMQ | gawk '{print "delete ql",$3}' | runmqsc $QM

A script to authorize "phred" to get from all non-SYSTEM queues:

./saveqmgr.linux -m$QM -1 -s -c | egrep '^DEFINE QLOCAL|QREMOTE|QMODEL|QALIAS' | awk '{print $3}' |  \
sed -e "s/('\(.*\)')/\1/" | xargs -i  -t setmqaut -m $QM -t q -p phred -n {} +get

If you use GNU diff with the '-F' option on saveqmgr, you can get good detail about changed objects from yesterday:

diff -c -F DEFINE /tmp/wschutz.yesterday /tmp/wschutz.today
MS03 is a command line program and can be invoked with a -? flag to display
which parameters it will accept:

./saveqmgr. -?

where  is a platform specific extension, ie .exe for windows,
.solaris for solaris, etc.

Usage is:
 --help | -h | -?  : gives help (this)
 --localQMgr | -m lqmgr : is the name of the local qmgr to connect (MQCONN)
 --remoteQmgr | -r rqmgr : is the name of the remote qmgr (XMITQ name)
 --outputFile | -f [file] : allows the output file to be named, 
    if -f is not specified, the output file defaults to SAVEQMGR.MQSC
    if -f is specified without a filename, it is named \"qmgrname\".MQSC.
 --outputFileNoHeader | -F [file] : behaves the same as -f except no header line is created in the output file
      (and CURDEPTH, ALTDATE and  ALTTIME are not reported)
 --replaceOutput | -o : specifies to replace (overwrite) the output file
    if the -o flag is not specified, then the default is to append if the file exists
    (on iSeries, *REPLACE,*APPEND must be specified after the -o flag)
 --stdout | -c : directs output to STDOUT and overrides use of -f flag
 --noSyncPoint | -np : forces all puts and gets to specify NO_SYNCPOINT
 --noSubscriptions | -ns : suppress creation of subscriptions
 --noSystemObjects | -s [list] : suppress creation of objects that begin with \"SYSTEM*\"
       list is a comma separated selection from 
            QMGR,QUEUE,NAMELIST,CHANNEL,PROCESS,AUTHINFO,LISTENER,SERVICE,TOPIC,SUB,NONE
       Specifying NONE is equivalent to specifying -s without any options and will override all other choices
       This is an inclusion list, System objects of the types listed *will* be reported in the output file.
 --qm : A shortcut option that is exactly equivlaent to --noSystemObjects QMGR.
       The ALTER QMGR command will be produced, all other system objects will be skipped.
 --resetChannels | -R [flags] : create RESET CHANNEL commands
    flags can be any combination of the follow to create RESET for that channel type:
    s (SENDER) v (SERVER) r (RECEIVER) q (REQUESTER) c (CLUSSDR) d (CLUSRCVR)
    the default is to create RESET commands for all the above channel types
 --permDyn | -p : Create 'local queue' definitions from PERMDYN queues.
 --ignoreErrors | -i : Ignore 'pcf' error codes 'damaged object' 'unknown object'.
    Sets RetCode to WARNING if this error encountered.
 --quiet | -q : Quiet mode, do not issue warning about unknown PCF attributes
 --oneLine | -1 : generate entire DEFINE command on one line (which does NOT include ALTDATE etc)
 --twoLines | -2 : on a 2nd line, generate the DEFINE as a comment (which DOES include ALTDATE etc)
 --saveSecurity | -z [file] : create 'security definitions (like amqoamd -s)' in file 'file'(only >=V6)
           if not specified, defaults to \"qmgrname\".AUT 
 --saveSecurityNoHeader | -Z [file]: same as -z only without the header line
 --commandServerQ | -cs [queue]: the name of the Command Server Input queue, defaults to SYSTEM.ADMIN.COMMAND.QUEUE
 --version | -v version : determines which version of MQSC to generate
      and can be '2','5','51','52','53','6', or '7'
    The default is to generate mqsc at the version of the connected queue manager
    See "Notes on the '-v' flag" in this document before using this flag. 

The Client version of this program supports these additional flags:

If either the -a or -x switch is used, then MQCONNX will be used for the client connection
 --hostname | -a host : is the address of the host for a client connection (default is "localhost")
 --channel | -x channel : is the SVRCONN name for a client connection (default is "SYSTEM.DEF.SVRCONN")
 --sslCipher | -C cipher spec : indicates to use an SSL cipher spec for this client connection
 --keyRepos | -k key repository : name of key respository directory if using SSL for client connection
 --channelExitX | -eX channel exit: X = 'y' for security, 's' for send, 'r' for receive
 --channelDataX | -dX channel exit data: X = 'y' for security, 's' for send, 'r' for receive.


Comments

adsrerrapop

Popular posts from this blog

Troubleshooting Java/JMS SSL Configurations - Middleware News

 This document is intended to help diagnose WebSphere MQ V7 Java™ or JMS SSL setup errors. It lists most of the common configuration errors that can cause an SSL connection from a Java/JMS client to a queue manager to fail, and gives the course of action to resolve the problem. In each case the error can be diagnosed by a combination of the error seen in the client log - either a console output, trace file or SystemOut.log file - and the queue manager's error logs. The document is quite long, so the easiest way to find the potential error is to search for one of the errors seen in this list, then filter this list using the error from the opposite end of the channel. All cases here assume that 2-way authentication is being attempted (SSLCAUTH set to REQUIRED on the queue manager's SVRCONN channel). This is the default, and the errors are very similar for 1-way authentication (SSLCAUTH set to OPTIONAL). Symptom Instructions on collecting documentation...

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

Using telnet to test connectivity between IBM Websphere MQ Client and MQ server - Middleware News

You are having trouble connecting a WebSphere MQ client to a MQ server, receiving errors that you can not connect to the MQ queue manager. One of the first things to determine is if the two machines can communicate, and using the telnet tool is one way to accomplish it. Symptom Receiving errors which state that a queue manager is not found or not available. Connection errors. For example: AMQ9213, AMQ9524, AMQ9202 or AMQ9508 or MQRC =2059 0x0000080b MQRC_Q_MGR_NOT_AVAILABLE. Please note, this is by no means an exclusive list of errors related to this type a problem but just a sample of some of the more common error messages and codes that might occur. Cause One possible cause is that the two machines can not communicate. May be the IP address or hostname was not properly specified by the MQ client. The port number might be incorrect. A queue manager is not running at the desired host. The queue manager could be running, but the corresponding listener is not runnin...