ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Changing from linnear to circular logging but in Windows

Post new topic  Reply to topic
 Changing from linnear to circular logging but in Windows « View previous topic :: View next topic » 
Author Message
GEMO!
PostPosted: Sat Feb 11, 2006 8:59 am    Post subject: Changing from linnear to circular logging but in Windows Reply with quote

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
View user's profile Send private message Yahoo Messenger
wschutz
PostPosted: Sat Feb 11, 2006 9:20 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
GEMO!
PostPosted: Sat Feb 11, 2006 10:21 am    Post subject: amqmdain reg TEST1 -c add -s log -v LogType=CIRCULAR. Reply with quote

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
View user's profile Send private message Yahoo Messenger
GEMO!
PostPosted: Sat Feb 11, 2006 10:53 am    Post subject: Finally it does work! Reply with quote

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
View user's profile Send private message Yahoo Messenger
PeterPotkay
PostPosted: Sat Feb 11, 2006 11:12 am    Post subject: Reply with quote

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
View user's profile Send private message
GEMO!
PostPosted: Sat Feb 11, 2006 11:56 am    Post subject: You are right! Than you everybody Reply with quote

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
View user's profile Send private message Yahoo Messenger
kevinf2349
PostPosted: Sat Feb 11, 2006 12:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
GEMO!
PostPosted: Sat Feb 11, 2006 12:35 pm    Post subject: Explanation Reply with quote

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
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Sat Feb 11, 2006 6:05 pm    Post subject: Re: Explanation Reply with quote

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
View user's profile Send private message Send e-mail
GEMO!
PostPosted: Sat Feb 11, 2006 6:29 pm    Post subject: Thank you very much! Reply with quote

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
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Sat Feb 11, 2006 6:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
GEMO!
PostPosted: Mon Feb 13, 2006 3:24 am    Post subject: Thank you! Reply with quote

Apprentice

Joined: 08 Oct 2004
Posts: 33
Location: This World

Just to say Thank you!
_________________
GEMO!
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Changing from linnear to circular logging but in Windows
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.