Product Documentation

FairCom Replication JSON RPC API

Previous Topic

Next Topic

ctMemphisCheckDBEngineStatus

int ctMemphisCheckDBEngineStatus( pRCESJson request, ppRCESJson result )

Description:

Retrieve the current DBEngine status. If "checkConnection" is set, try to connect to the DBEngine to update its status and return its information. If "checkConnection" is set for all DBEngines, an action ID is returned and it is executed in the background.

HTTP URL: <baseURL>/ctMemphisCheckDBEngineStatus/

HTTP Verb: POST

Note:

  • EngineStatus values: -1 = invalid status, 0 = inactive, 1 = active, 2 = stopping, 3 = starting, 4 = checking, 5 = active with warning, 6 = unavailable, 7 = switching AvailGroup to new primary, 8 = unmanaged

Parameters:

  • request [IN] - Check DBEngine request in JSON format. For example:

{

"id": 2, // Optional. If it is not passed or if it is -1,

returns the status for all the DBEngines

"checkConnection": true // optional. Default is false. If it is true,

the Replication Manager Database will try to connect to

the DBEngine to make sure its status is updated.

If DBEngine isnot running, response time may be long.

}

  • result [OUT] - Result in JSON format. For example, if "checkConnection" is FALSE or the ID is provided:

{

"dbEngineStatusList": [

{

"id": 2,

"status": "active", // see "EngineStatus" note above

"statusCode": 1, // see "EngineStatus" note above

"statusTime": "2015-11-05T10:00:00", // when this status has been set

"lastCheckTime": "2015-11-17T11:35:00", // last time that the DBEngine

connection has been tested

"acceptConn": 1, // Flag indicating that the server

accepts external connections

"readOnly": false, // Flag indicating that the server

is in ReadOnly status

It can be true, false, or never

(in the last case it cannot be changed)

"isMemphis": 0,

"replNodeID": "1.1.1.2", // Unique Replication Node ID

"actionExecs": [

{

"type": "BASIC", // Supported types: BASIC, FILE_SYSTEM,

REPLICATION, REPL_CTREE

"status": "active",

"threadCount": 1,

"statusTime": "2015-11-05T10:00:00"

},

{

"type": "FILE_SYSTEM",

"status": "active",

"threadCount": 4,

"statusTime": "2015-11-05T10:00:00"

},

{

"type": "REPLICATION",

"status": "active",

"threadCount": 4,

"statusTime": "2015-11-05T10:00:00"

}

]

}

],

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

}

}

Checking All DBEngines:

Note: If "checkConnection" is TRUE and we are checking all DBEngines, we execute it asynchronously, by returning the action ID to be checked (ctMemphisCheckAction) and it is executed in the background:

{

"actionID":44135,

"success": true,

"error":

{

"errorCode": 0,

"message": "Success"

}

}

Return:

Error code

TOCIndex