Author |
Message
|
GEMO! |
Posted: Sat Feb 11, 2006 8:59 am Post subject: Changing from linnear to circular logging but in Windows |
|
|
Apprentice
Joined: 08 Oct 2004 Posts: 33 Location: This World
|
Hi everybody,
I have a tested procedure to converting from linnear to circular loggin in Unix OS (I've attached my procedure used in Unix below) . But now I'm needing to do the same on Windows platform.
How can I modify the logging value in snap-in (MQ Services)?? I was reading about the command "amqmdain" which is used instand of the snap-in.. but I could not find where can I change the value of paratemer "use linnear loggin" to "use circular loggin
Procedure that I use to converting from linnear to circular. I'm stucked in step #7 since MQ in Windows has not mq.ini.
---------------------------------------------------------------------------------------
CONVERTING LINEAR TO CIRCULAR LOGGING
1.Ensure there is available space.
2.create temporary queue manager
crtmqm –lc –lf4096 –lp14 –ls5 DUMYQM
note: review current logging activity and reduce or increase lp and ls accordingly
3.stop queue manager
stopmq QMGR123
where QMGR123 is the queue manager name
4.clear residual shared memory, if any
ipcs –a |grep mqm
rmipcs.ksh or mqipcrm
5.rename log current log directory
cd /var/mqm/log
mv QMGR123 OLD123
mv DUMYQM QMGR123
6.rename temporary queue manager’s log
cd /var/mqm/log
mv DUMYQM QMGR123
7.update qm.ini
From >
Log:
LogPrimaryFiles=10
LogSecondaryFiles=5
LogFilePages=1024
LogType=LINEAR
To >
Log:
LogPrimaryFiles=14 ** lp parameter in crtmqm
LogSecondaryFiles=5 ** ls parameter in crtmqm
LogFilePages=4096 ** lf parameter in crtmqm
LogType=CIRCULAR ** lc parameter in crtmqm
8.start queue manager
startmq QMGR123 –p 1414
----------------------------------
any ideas? toughs? suggestions?
Cheers! _________________ GEMO! |
|
Back to top |
|
 |
wschutz |
Posted: Sat Feb 11, 2006 9:20 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I don't think this is a good idea. The fact that you got it to work today doesn't mean it will work tomorrow. Logging should be set at qmgr creation time. If you need to really change the logging, save the qmgr definitions and create a new qmgr with the type of logging you need. _________________ -wayne |
|
Back to top |
|
 |
GEMO! |
Posted: Sat Feb 11, 2006 10:21 am Post subject: amqmdain reg TEST1 -c add -s log -v LogType=CIRCULAR. |
|
|
Apprentice
Joined: 08 Oct 2004 Posts: 33 Location: This World
|
Wschutz
You are right... probably is not a good idea. However I'd like to know (I wish somebody knows) how can I change the LogType using "amqmdain command.
I'm sumbiting this command as follow but it is not working:
amqmdain reg TEST1 -c add -s log -v LogType=CIRCULAR.
(The bold letters are the part of command that I don't know.)
This is the outcome:
Invalid stanza 'log' specified for Queue Manager 'TEST1'
You can find more information in WebSphere MQ Systems Administration Guide manual.
As a least try I've changed the value directly in the windows registry (I know that this is not recommended but I'm using a Test Qmgr.) but it does not work....
Any ideas to help this obstinate MQ creazy guy?!
 _________________ GEMO! |
|
Back to top |
|
 |
GEMO! |
Posted: Sat Feb 11, 2006 10:53 am Post subject: Finally it does work! |
|
|
Apprentice
Joined: 08 Oct 2004 Posts: 33 Location: This World
|
Hi Everybody!
Finally it is working now.
I just changed the value, in the Win regestry as follow:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\QueueManager\TEST1\Log
Stanza: LogType
Changed from LINEAR to CIRCULAR.
Then it was working OK. I'll let you know if this stuff working fine at least one week .
 _________________ GEMO! |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Feb 11, 2006 11:12 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Dude, all you have accomplished is pulling off something that seems to work OK for now, could stop working any day, is not supported by IBM so if you have any other problems related or not you won't get help once they find out what you did, and your end result could be accomplished properly in a much simpler and quicker way.
Just back up the QM defs with MS03, delete it and recreate it with the logging type you need. About 10 minutes tops. Why jump through all these hoops?  _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
GEMO! |
Posted: Sat Feb 11, 2006 11:56 am Post subject: You are right! Than you everybody |
|
|
Apprentice
Joined: 08 Oct 2004 Posts: 33 Location: This World
|
All of you are right! I know that this kind of workarounds are not supported by IBM. But the root cause to accomplish this madnes was my obstinate personality... hehe... any way I appreciate your comments and support!....
Don't worry... this workaround won't be deployed in production.
 _________________ GEMO! |
|
Back to top |
|
 |
kevinf2349 |
Posted: Sat Feb 11, 2006 12:01 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Sounds like a recipe for disaster to me.
A couple of questions spring to mind....why not simply define another queue manager with Circular logging and (as Peter) suggests use saveqmgr to build it the same as the old one, then migrate (if you don't want to risk losing any messages which Peter's method could do if you don't back the messages up first)
If you don't need any of the messages then Peter's method is the way to go. IMHO
But maybe the most important question is ...why are you needing to change it at all? |
|
Back to top |
|
 |
GEMO! |
Posted: Sat Feb 11, 2006 12:35 pm Post subject: Explanation |
|
|
Apprentice
Joined: 08 Oct 2004 Posts: 33 Location: This World
|
Kevin,
From the beginning: For an Internal guideline all the production Qmgrs have to be CIRCULAR loggin Type. So I'm searching ways to converting from Linear to Circular. In the brainstorm at coffe time, somebody challenged me to change the logtype without a Qmgr recreation. He said that is impossible.... So my big mouth said .. Hey it can be done.... just let me try.. I know that this is not supported and no recomended ... but at least I won the bet.
That's the reason.. now.. I have several Qmgrs converting using my procedure in production from 2 years ago to date, and I have zero incidents with those Qmgrs. Obviously this is not a conclusion... I was refusing to do this in Windows.
Last question:
Since I need to keep the current messages in the Qmgr to convert. How is the procedure to backup and restore them? Remember this is production....
Another Key .. I need that Qmgr keep the current name....
Any suggestions?
 _________________ GEMO! |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Feb 11, 2006 6:05 pm Post subject: Re: Explanation |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
GEMO! wrote: |
Kevin,
From the beginning: For an Internal guideline all the production Qmgrs have to be CIRCULAR loggin Type. So I'm searching ways to converting from Linear to Circular. |
You better get in touch with your management and warn them that this directive/guideline has the potential for disastrous results. Remember circular logging only guarantees transaction integrity. Assured delivery cannot be achieved with circular logging as even persistent messages are not guaranteed while living on a queue. The IBM manual suggest that all qmgrs in production be on linear logging (remember reading it, I believe in the admin manual?)
GEMO! wrote: |
Last question:
Since I need to keep the current messages in the Qmgr to convert. How is the procedure to backup and restore them? Remember this is production....
Another Key .. I need that Qmgr keep the current name....
Any suggestions?
 |
Easy suggestion.
0) Take the qmgr down for maintenance and do not allow any connections (client or bindings)
1) Use saveqmgr (MS03) to save all definitions
2) Perform an off-line backup (file system)
3) Delete the qmgr
4) Recreate the qmgr with correct logging parm
5) restore the queues from the backup
6) start the qmgr and restore from the MS03 file
7) Check that everything is there including messages on queues.
8\) Allow the qmgr to be used again by the apps
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
GEMO! |
Posted: Sat Feb 11, 2006 6:29 pm Post subject: Thank you very much! |
|
|
Apprentice
Joined: 08 Oct 2004 Posts: 33 Location: This World
|
To much appreciated your suggestions!
fjb_saper: You are right! as a first thing that an MQ Course teachs is that the Linnear Qmgrs are the most suitable LogType to production environments.
Probably I'm lacking of a good base, but anyway....here my toughs.. and the ideas that my team defined some time ago..
A circular loggin can ensure the message integrity if you provides a good logginfg feature. What about if you define a large logging? for example 15 as primary and 9 as secundary, then each log as 4MB. ? I think in this way we are able to ensure the none message is lost. This was defined once the transactionality was known.
From the beginning I saw severals problems. For example: Circular is not allowing to recreate damaged objects right?.... But, I could not convice to my team about the inconveniences... Any way we have more the 50 Qmgrs with Circular log.. Running in production!!!!! Believe it or not! but it is a fact!!!! .. It sounds a bad thriller story .. but is true!.... I'd like to know the root reasons. Any way I'll be touching this topic in my next team meeting....
Thank you so much Dude! ...
 _________________ GEMO! |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Feb 11, 2006 6:37 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Usually qmgrs in circular logging will run fine. The message is guaranteed during the time of the transaction (put, get). While on the queue (between put and get) it is not guaranteed as it is not in a transaction. You have to rely on your disk to be mirrored correctly and NEVER go bad.
One way to mitigate the risk (at low cost) is to run with linear logging and have lots of space in the logs (worth > 24 hours of logs) and archive regularly the non active logs.
Queues, logs, and archive should be on 3 different file systems so that if one goes bad it does not affect the others as they may be needed to rebuild the state of the qmgr to when it went down.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
GEMO! |
Posted: Mon Feb 13, 2006 3:24 am Post subject: Thank you! |
|
|
Apprentice
Joined: 08 Oct 2004 Posts: 33 Location: This World
|
Just to say Thank you! _________________ GEMO! |
|
Back to top |
|
 |
|