At times users may wish to set priority for posting when multiple Post queues exist (when named Post queues are configured). This could be due to a number of reasons, including, but not limited to, issues with one of the named queues, important data handled by one of the named queues which needs to be posted sooner than other post queues, etc. This solution delves on the way to achieve it.
General information.
There is no direct way to set the priority of various named Post queues within Shareplex. However, there are two ways to achieve that, one of them is indirect way within Shareplex and another way is the direct way within Unix.
A: Indirect way by configuring the parameter SP_OPO_POSTER_DELAY:
The parameter SP_OPO_POSTER_DELAY can be configured for a specific queue to delay Post from posting the messages. Though this is an indirect way, it is by far the simplest. The parameter can be configured for all the named Post queues to delay their posting depending on the latency sought. This way some of the named Post queues will post faster than others. By default it is set at 0. Here is the description of the parameter:
SP_OPO_POSTER_DELAY
This parameter controls the amount of time in minutes that the Post process delays before it posts
records to the target instance. Normally, Post applies the changes immediately to minimize
latency between the source and target systems, but you can delay posting for up to
5 days (7200 minutes).
For example, if you want Post queue A to have a latency of 1000 minutes and Post queue B to have a latency of 2000 minutes, then you will set the parameter as below:
sp_ctrl>set param SP_OPO_POSTER_DELAY queue A 1000
sp_ctrl>set param SP_OPO_POSTER_DELAY queue B 2000
The parameter is live and will take effect immediately. To undo the change at any point of time in future:
sp_ctrl>reset param SP_OPO_POSTER_DELAY queue A
sp_ctrl>reset param SP_OPO_POSTER_DELAY queue B
B: Direct way by renicing the various Post processes depending on the priority sought:
The renice command in Unix can be used to set priority for a process. Though it is beyond the scope of this solution to provide the exact commands required to renice a process in Unix (because of various flavors of Unix in existence, and the complexity in implementing it due to the need to do shell scripting and the implications when doing so incorrectly), suffice it to say that this is one way to achieve it directly. Two things that are noteworthy is that the simply renicing the process once is not enough (as Oracle and other applications would keep renicing their processes continuously and the priority of Shareplex process will keep slipping) and renicing is needed to be done continually using a shell script. Moreover, the renicing can only be done once the process is launched and its PID is consequently known. The indirect method in para A does not have this limitation.
See Solution # SOL20868 for details on renice command.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center