Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisRestoreAvailGroup

int ctMemphisRestoreAvailGroup( pRCESJson request, ppRCESJson result )

Description:

Restore Availability Group to a previous primary replica that must be recovered. Each primary replica that has failed over, received a recover order (recoverOrder - previous primary replica index), this index must be used identify to which replica we should restore the primary. If the chosen replica is behind, which means, still in the recover process, it will fail.

HTTP URL: <baseURL>/ctMemphisRestoreAvailGroup/

HTTP Verb: POST

Constraints:

  • "id" must be an existing Availability Group ID.
  • "recoverOrder" must be a recoverOrder index from any Replica part of the Availability Group.

Parameters:

  • request [IN] - Restore Availability Group request in JSON format. For example:

{

"id": 0, // Required - Availability Group identification

"recoverOrder": 0, // Required - Previous primary replica index

"primaryDBEngine": 1 // Optional - Set DBEngine as the primary

// If no "recoverOrder" or "primaryDBEngine" are provided,

it will assume current primary replica configuration

}

  • result [OUT] - Result in JSON format. For example:

{

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

}

}

Return:

Error code

TOCIndex