mco_HA_set_master_params

This function is called by the master (and a replica becoming master) to set the master HA runtime parameters.

For an overview, see HA Applications.

Prototype

    void mco_HA_set_master_params(mco_db_h db,
                                  mco_HA_master_params_t* params)

Arguments

db
Database connection handle.
params
HA master parameters defined in the mco_HA_master_params_t structure.

Description

This function is called by the master to set the master HA runtime parameters. It is also called when a replica application must change its role to master. The role of the HA runtime is implicitly set to standby when it calls mco_HA_attach_master(), or to master when it calls mco_HA_attach_replica(). mco_HA_set_master_params() is also used when it is necessary to set the HA mode to shared commit; see mco_HA_trans_commit_synch().

Return Codes

MCO_S_OK
The HA mode was set successfully.
MCO_E_HA_NOT_INITIALIZED
The mco_HA_start() function must be called first.
MCO_E_HA_MULTICAST_NOT_SUPP
Multicast is not enabled.
MCO_E_HA_HOTSYNCH_NOT_SUPP
Hot synchronization is not enabled.
MCO_E_HA_ASYNCH_NOT_SUPP
Asynchronous replication is not enabled.
MCO_E_HA_MAXREPLICAS
The maximum number of replicas was exceeded.
MCO_E_HA_INVALID_PARAMETER
Shared commit is not enabled.