ha set primary argument: Define an HDR primary server (SQL administration API)

Use the ha set primary argument with the admin() or task() function to define a High-Availability Data Replication (HDR) primary server and specify the secondary server.


Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+--(------------------------------->

>--"ha set primary"--,--"secondary_server"--)--;---------------><

Element Description Key Considerations
secondary_server The name of the HDR secondary server to connect to. The name must be defined in the DBSERVERNAME or DBSERVERALIASES configuration parameter, or as an Enterprise Replication group name.


Run this function on a standard server to convert it to an HDR primary server and connect to the specified HDR secondary server. If the connection is successful, replication begins.

This function is equivalent to the onmode -d primary command.


The following example converts a standard server named ids_stores to an HDR primary server:
EXECUTE FUNCTION task("ha set primary","ids_stores");

Copyright© 2020 HCL Technologies Limited