The following steps are
required to cold start MQ on Linux:
Replacing Corrupted logs of a QMGR:
1. Delete all current queue manager logs:
mqm@mqm:~>
cd /
mqm@mqm:~>
cd /var/mqm/log/OLDQMGR
mqm@mqm:~>
rm -r *
2. Create a DUMMY
queue manager:
(Note: LOG PROPERTIES MUST MATCH OLDQMGR!!!)
If the corrupted QMGR
logs looks like below:
LogPrimaryFiles=55 -lp
LogSecondaryFiles=2 -ls
LogFilePages=16384 -lf
LogType=LINEAR -ll
Command to duplicate
it:
mqm@mqm:~> crtmqm –lp 55 –ls 2 –lf 16384 -ll DUMMY
This might take little time.
Note: DON'T START
the dummy qmgr once it is done.
3. Move file
(amqhlctl.lfh) and directory (active) under:
/var/mqm/log/DUMMY into /var/mqm/log/OLDQMGR
mqm@mqm:~>
mv /var/mqm/log/DUMMY/*
/var/mqm/log/OLDQMGR
4. Restart your
QMGR:
Note: make sure all qmgr related processes are down:
ps –ef | grep <qmgrname
>
If you see some
process still running Kill it with process id just like below:
kill –9 pid
mqm@mqm:~> strmqm OLDQMGR
5. Delete the
dummy QMGR:
mqm@mqm:~>
dltmqm DUMMY
Since the logs been replaced, We lost all information to
commit or backout messages but all persistent messages are still in the queues
(you don't lose persistent messages).
Thanks,
Guru
Comments