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.

Syntax


1  EXECUTE FUNCTION
1 admin
1 task
2  (
2  "ha set secondary" , "primary_server"
2  ) ;
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.

Usage

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.

Example

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");