int ctMemphisSetDBEngineReadOnly( pRCESJson request, ppRCESJson result )
Description:
Set or remove read-only status for the DBEngine.
The Replication Manager uses ctSETCFG() to set the READONLY_SERVER keyword for the DBEngine being changed.
Keyword
The read-only status set by the API has higher precedence than the READONLY_SERVER keyword in ctsrvr.cfg. This means that, when the <FC_PROD_RPL> is starting, it will rely on the ctsrvr_readonly global variable to decide its status and will not consider the keyword in ctsrvr.cfg. The only exception is when <FC_PROD_RPL> is not running embedded, it still on the ctsrvr.cfg keyword, assuming that later the server will start with an embedded agent and will have it fixed.
Never
The ReadOnly property inReplication Manager is an enum type supporting the following values: "false", "true", and "never". Before initializing the <FC_PROD_RPL>, the status is checked and, if it is "never", ctMemphisSetDBEngineReadOnly() will return this error:
RCES_NEVERRONLY_ERR = 9073, /* DBEngine doesn't support readonly mode */
The following high-level web APIs can return the "never" status: ctMemphisGetDBEngines, ctMemphisCheckDBEngineStatus, ctMemphisGetReplPlansDetails, ctMemphisGetArchivedReplPlansDetails, and ctMemphisGetDBEnginesByGroup.
Compatibility Notes:
HTTP URL: <baseURL>/ctMemphisSetDBEngineReadOnly/
HTTP Verb: POST
Parameters:
{
"id": 2,
"readOnly": true // Required, accepted values: true or false.
If it is already set to "never", this call will fail.
}
{
"success": true,
"error":
{
"errorCode": 0,
"message": "Success"
}
}
Return:
Error code