The “fixup all” and “qfixup” commands are used for fixing queue corruption.
The command “fixup all” which is a part of qview utility has been documented in various external and internal articles and is widely known and used in SharePlex Support circle. The utility also has a lesser known command “qfixup” that has a slightly different functionality. Both these commands have their own characteristics and it may be advantageous to use one over the other, depending on situations. This article delves on pros and cons of each.
Both “fixup all” and “qfixup” commands are used for fixing queue corruption.
The “fixup all” does not take any queue name as argument and operates upon all type of queues (Capture, Export, Post) that exist on the server with an intent to fix queue corruption, if any. In that sense it is easier to run. Here is a sample run:
1. Shutdown Shareplex
2. Invoke the qview program located in the bin sub directory under product directory and run "fixup all" against qview prompt as follows:
$ qview –i (here $ denotes OS prompt)
qview> fixup all
Fixup subqueue 0
Fixup subqueue 4
.
.
Fixup subqueue 27
Fixup subqueue 28
Fixup subqueue 29
Fixup subqueue -2
Corruptions fixed - see report in /vardir/log/que_fixup.log
3. Restart SharePlex.
The corruption does not usually occur in all queues and there are various ways this can be ascertained. For example, the # of messages and the backlog can keep increasing in the queue that has corruption. At times the backlog is found to be much larger than the # of messages in a corrupted queue. The event log also indicates a corruption in a particular queue by way of strings like "reseq/getdata bad hdr magic", "peekahead failure buffer hdr", "Cannot initialize queues: An illegal queue message has been detected", etc. Moreover, when the corruption occurs in some queue(s), it is quite possible that the other good queues have huge # of messages and backlog. Running “fixup all” which operates on all queues regardless of corruption existing in them is an overkill and may take a longer time depending on the # of messages in such queues. This is where “qfixup” comes handy as it provides us the option to fix queue corruption for a specific queue. Here is a sample run:
1. Shutdown Shareplex
2. Invoke the qview program located in the bin sub directory under product directory and run "fixup all" against qview prompt as follows:
$ qview –i (here $ denotes OS prompt)
qview>qfixup c (we are running it on the Capture queue in this example)
Fixup subqueue 0
Fixup subqueue -2
Queue OK - no changes made (no corruption has been detected in our example)
3. Restart SharePlex.