DBEngine
DBEngines for C++ Replication API
OpSystem (operating system) may contain one or more database servers. Only FairCom DB database servers are recognized in this release. Each DBEngineGroup may contain one or more DBEngines. A DBEngine may contain one or more Databases.
OpSystem (operating system) may contain one or more database servers. Only FairCom DB database servers are recognized in this release. Each DBEngineGroup may contain one or more DBEngines. A DBEngine may contain one or more Databases.
Table 1, “Engine status” lists enums defined as values for FCREPLEngineStatus
and FCREPLAgentStatus
.
Symbolic | Code | Description |
---|---|---|
| -1 | Engine invalid status |
| 0 | Engine inactive |
| 1 | Engine active |
| 2 | Engine stopping |
| 3 | Engine starting |
| 4 | Engine checking |
| 5 | Engine active with warning |
| 6 | Engine unavailable |
| 7 | Switching avail group to new primary |
| 8 | Engine unmanaged |
Class
FCREPLDBEngine
Represents a physical Replication (referred to as Memphis) database server. Initially, it supports only FairCom type.
Getters
DBEngine status |
|
Server connection string |
|
Full absolute local directory | char *GetFullDataPath() { return ((pRCESDBEngine)this)->GetFullDataPath(); }; |
Inherited getters
DBEngine identification |
|
OpSystem identification that is running the agent NoteIt is linked to the |
|
DBEngine name |
|
Status |
|
Last time the DBEngine status changed |
|
Last time the DBEngine status has been checked |
|
Host name/IP address |
|
DBEngine description |
|
Encrypted authentication information (login and password) |
|
Working volume identification NoteIt is linked to |
|
Working directory |
|
Username |
|
Password |
|
Retrieve the server name |
|
Retrieve the server name by IP address |
|
Windows service name |
|
Executable name |
|
Return if DBEngine is a SQL server |
|
ISAM port number |
|
SQL port number |
|
Local directory's volume identification NoteIt is linked to FCREPLVolume class. |
|
Local directory |
|
Maximum number of users |
|
Release version |
|
Serial number |
|
License OEM |
|
License type (development, production, and so forth) |
|
License number of CPU limit |
|
License server type (ISAM, SQL, and so forth) |
|
License user number |
|
Working volume name |
|
Local volume name |
|
Retrieve the full data directory |
|
DBEngine has Replication Manager embedded |
|
Logical name |
|
Retrieve the authentication info for the current DBEngine |
|
Return if DBEngine is the server |
|
Replication unique node identification |
|
Flag indicating the DBEngine must be connected by the IP address instead of the hostname |
|
Specify IP address to be used when trying to connect to the DBEngine |
|
Return IP address list |
|
Number of IP addresses in the list |
|
Flag indicating if the DBEngine accepts external connections |
|
Flag for the DBEngine read-only status |
|
Get read-only string |
|
Get is Memphis flag |
|
Setters
DBEngine status |
|
DBEngine name |
|
Host name/IP address |
|
DBEngine description |
|
Working directory |
|
Username |
|
Password |
|
Encrypted authentication information (login and password) |
|
Local directory |
|
Release version |
|
Serial number |
|
License type (development, production, and so forth) |
|
License server type (ISAM, SQL, and so forth) |
|
Logical name |
|
Replication unique node identification |
|
Specify IP address to be used when trying to connect to the DBEngine |
|
Inherited setters
DBEngine identification |
|
OpSystem identification that is running the agent NoteIt is linked to the FCREPLOpSystem class. |
|
Name |
|
Status |
|
Last time the DBEngine status changed |
|
Last time the DBEngine status has been checked |
|
Host |
|
Description |
|
Working volume identification NoteIt is linked to FCREPLVolume class. |
|
Working directory |
|
Auth content |
|
Return if DBEngine is a SQL server |
|
ISAM port number |
|
SQL port number |
|
Local directory's volume identification NoteIt is linked to FCREPLVolume class. |
|
Local directory |
|
Working volume name |
|
Local volume name |
|
Username |
|
User password |
|
DBEngine has Replication Manager embedded |
|
Return if DBEngine is the Memphis server |
|
Repl node ID |
|
Flag indicating that the DBEngine must be connected by the IP address instead of the hostname |
|
IP address |
|
IP address list |
|
Number of IP addresses in the list |
|
Flag indicating if the DBEngine accepts external connections |
|
Flag for the DBEngine readonly status |
|
Retrieve all the DBEngines entity objects for the given OpSystem identification.
Prototype
FCREPL_API int fcReplGetDBEngines(pFCREPLConn replConn, int osID, ppFCREPLDBEngine *dbEngineList, int *dbEngineCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| OS identification |
| DBEngine entity list |
| Number of DBEngine entities in the list |
Return
Error code
Retrieve the DBEngine entity object by its name.
Prototype
FCREPL_API int fcReplGetDBEngine(pFCREPLConn replConn, int osID, int workingVolume, const char *workingDir, ppFCREPLDBEngine dbEngine);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| OS identification |
| Working volume |
| Working directory |
| DBEngine entity retrieved |
Return
Error code
Add a DBEngine entity into the database. If there already is a DBEngine with the given osID/name, update the existing record.
Prototype
FCREPL_API int fcReplPersistDBEngine(pFCREPLConn replConn, pFCREPLDBEngine dbEngine);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine entity to be persisted |
Return
Error code
Delete the DBEngine by its identification.
Prototype
FCREPL_API int fcReplRemoveDBEngine(pFCREPLConn replConn, int dbEngineID, bool recursive);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine identification |
| Recursive flag |
Return
Error code
Try to connect to the dbEngine from the replication server in order to update its status. After validating it, returns its status.
Prototype
FCREPL_API int fcReplCheckDBEngineStatus(pFCREPLConn replConn, int dbEngineID, bool checkConn, ppFCREPLDBEngine *dbEngineList, int *dbEngineCount, int *actionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine identification |
| Flag indicating that Replication Manager should try to connect to the DBEngine in order update the status |
| DBEngine entity list retrieved or NULL in case it doesn't want to retrieve it. |
| DBEngine entity list count. |
| Action identification returned in case of checkConnection for all the DBEngines. |
Return
Error code
Remove or restore the given DBEngine to be managed by the Replication Manager system.
Prototype
FCREPL_API int fcReplSetDBEngineManaged(pFCREPLConn replConn, int dbEngineID, bool managed);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine identification |
|
|
Return
Error code
Set if the DBEngine accepts external connections or not.
Prototype
FCREPL_API int fcReplSetDBEngineAcceptConn(pFCREPLConn replConn, int dbEngineID, bool managed);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine identification |
| Flag indicating if the DBEngine can or can't accept external connections |
Return
Error code
Set the DBEngine read-only status.
Prototype
FCREPL_API int fcReplSetDBEngineReadOnly(pFCREPLConn replConn, int dbEngineID, bool readOnly);
Parameters
Parameter | Description |
---|---|
| Master provider |
| DBEngine identification |
| Flag indicating if the DBEngine is read-only |
Return
Error code
Prototype
FCREPL_API int fcReplSetDBEngineStatus(pFCREPLConn replConn, int dbEngineID, FCREPLEngineStatus status, bool managed);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| DBEngine identification |
| New status |
| Flag indicating that DBEngine should be restored as managed |
Return
Error code