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

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


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

>--"ha set secondary"--,--"primary_server"--)--;---------------><

Element Description Key Considerations
primary_server The name of the HDR primary 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 database server to convert it to an HDR secondary server, and connect to the specified primary server. If the connection is successful, replication begins.

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


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

Copyright© 2018 HCL Technologies Limited