indexinginformixcorruptionhdr

Need to drop/recreate indexes and primary keys, but both primary and hdr secondary have index page logging turned off


I have a concern when dropping and recreating indexes and primary keys in INFX 12.10. Both the primary server and HDR secondary server have index page logging and dridxauto set to 0. Given that the corruption is already present on these indexes, if I drop and recreate them on the primary with auto indexing off on both servers, what would be the best way to complete the task in order to ensure the changes make it over to the secondary? a) running 'onmode -d index {db}:{table}#{index_name}' on the secondary after the fix b) run 'onmode -d idxauto on' (on both servers or just the secondary?) before the fix

Also, what are the implications or cautions if I run the fix on the primary with the secondary server down? Should I just wait until the secondary is up to perform either of the above actions?

I would note that the index/key corruption IS present on both the primary and secondary servers presently.

I have not tried any of these options yet as I do not have a test env, only live.


Solution

  • It should not make any difference whether you recreate the index on the primary with the HDR server down or running. Note that the base table will be locked whilst the index is created unless you can use the ONLINE keyword.

    Once the HDR server is running, you can use either of the onmode -d index or onmode -d idxauto commands to transfer it from the primary server. This command is run on the HDR server only. The base table on the primary server will be locked during the index transfer so if that is an issue then perhaps using the onmode -d index command at a suitable time would be the better option. Note that if the index is fragmented then the onmode -d index command will transfer all of the index fragments whilst the onmode -d idxauto command will transfer only the required fragment.

    You can find further information in the documentation for onmode -d command: Replicate an index with data-replication and Replicate an index to an HDR secondary database server.