How to keep triggers enabled on the backup node in iCluster
Traditionally iCluster has always disabled triggers on the backup node for replicated physical files with triggers. This is to prevent duplicate entries – the original update being done by the trigger on the primary is replicated by iCluster and applied through the apply process, so if the trigger is also enabled on the file on the backup node, that transaction will be applied again. Some customers however have applications that can handle that issue and in fact use the triggers on the backup node to apply changes to files that are NOT being replicated by iCluster.
For these customers, an enhancement was added to iCluster 7.1 TR1 IF8, and is also included in the recently released TR2 to keep those triggers enabled.
To implement this enhancement, make sure you are on at least Interim Fix 8 of iCluster TR1 or on TR2. Use Option 7 on the main menu or the DMSYSINF command. Next manually change the metadata file ICLUSTER/DMGROUPS on both nodes by updating the RESERVED2 field to ‘*MNTTRGSTS’ (maintain trigger states’) in the record for the group. You can use the SQL command below in STQSQL:
UPDATE ICLUSTER/DMGROUPS SET RESERVED2=’*MNTTRGSTS’ where GROUP = ‘<group_name>’
After the DMGROUPS metadata files are updated ON BOTH NODES, end the group and issue a DMSETPOS then restart the group. The end result is that the triggers of the files refreshed by the group will have the same state on the backup as on the primary node. In addition adding a trigger on the primary node will be replicated by the group to backup node and the trigger will remain enabled on the backup. Disabling a trigger on the primary node will be replicated by the group to backup so that the trigger is disabled on the backup. Enabling a trigger on the primary node will be replicated by the group to the backup so that the trigger is enabled on the backup. Finally during a group switchover, the trigger states on both nodes are kept as the same.
To back-out of using this feature, basically reverse the steps, update the RESERVED2 field in the record of DMGROUPS to blank or a value other than ‘*MNTTRGSTS’, then manually disable all triggers of the files on the backup. The files on the backup node that are replicated by the group can be found in HATMOBJ metadata file. Finally end the group, and do a DMSETPOS, then restart the group.