Replication plan
Replication plans for the C++ Replication API
A replication plan entity links two DBEngines, so multiple subscriptions (FCREPLSubscription) instances can be part of that in different directions, but all of them must be between the same two DBEngine nodes.
Class
FCREPLReplPlan
A replication plan entity links two DBEngines, so multiple subscriptions (FCREPLSubscription
) instances can be part of that in different directions, but all of them must be between the same two DBEngine nodes.
Getters
replication plan status |
|
Source DBEngine object |
|
Target DBEngine object |
|
Replication direction |
|
Inherited getters
replication plan identification |
|
replication plan name |
|
replication plan description |
|
Replication status code |
|
Last time replication plan status has changed |
|
Message related to the replication plan status |
|
Action identification responsible for the replication plan new status NoteThis is linked to the |
|
Source DBEngine identification NoteThis is linked to the |
|
Source DBEngine ID |
|
Target DBEngine identification NoteThis is linked to the |
|
Target DBEngine |
|
IsSynchronous replication |
|
Warning threshold |
|
Error threshold |
|
Latency |
|
Latency time |
|
Latency rev |
|
Latency rev time |
|
File mask |
|
Return if the replication plan has already been deployed |
|
Return if the replication plan is pulling (agent running on target) |
|
Return if the replication plan is transforming partitioned source files into non-partitioned target files |
|
Return if during the deploy we are copying only the data files and index will be rebuilt |
|
Source transaction log position |
|
Target transaction log position |
|
Source transaction ID |
|
Target transaction ID |
|
Source Replication Manager agent identification NoteThis is linked to the |
|
Target Replication Manager agent identification NoteThis is linked to the |
|
Return if the replication monitor feature is active |
|
Time that the replication monitor has been enabled or disabled |
|
Direction |
|
Refresh rate |
|
Return if the replication exception log monitor is active |
|
Time that the replication exception log monitor has been enabled or disabled |
|
Return if the replication function profiling is active |
|
Time that the replication function profiling has been enabled or disabled |
|
Return if the replication is paused |
|
Time that the replication has been paused or resumed |
|
Replication has a filter on the source file to be replicated |
|
File name with the replication file filter |
|
Flag indicating if replication plan any non-acknowledged exception |
|
Flag indicating if replication plan is during an exception dump process |
|
Return if the replication has an agent running on the source node |
|
Return if the replication has an agent running on the target node |
|
Replication batch size ( NoteThis is a c-tree replication-specific setup. |
|
Replication debug minimum log position ( NoteThis is a c-tree replication-specific setup. |
|
Replication exception mode ( NoteThis is a c-tree replication-specific setup. |
|
Replication lock retry count ( NoteThis is a c-tree replication-specific setup. |
|
Replication lock retry sleep ( NoteThis is a c-tree replication-specific setup. |
|
Replication log change details ( NoteThis is a c-tree replication-specific setup. |
|
Replication read timeout ( NoteThis is a c-tree replication-specific setup. |
|
Replication remember log position ( NoteThis is a c-tree replication-specific setup. |
|
Replication conflict detection ( NoteThis is a c-tree replication-specific setup. |
|
Setters
replication plan status |
|
Source DBEngine object |
|
Target DBEngine object |
|
replication plan name |
|
replication plan description |
|
Message related to the replication plan status |
|
Source transaction log position |
|
Target transaction log position |
|
File name with the replication file filter |
|
Replication log change details ( |
|
Inherited setters
replication plan identification |
|
replication plan name |
|
replication plan description |
|
replication plan status |
|
Last time replication plan status had changed |
|
replication plan message |
|
Action identification responsible for the replication plan new status NoteThis is linked for |
|
Source DBEngine identification NoteThis is linked to | |
Source DBEngine |
|
Target DBEngine identification NoteThis is linked to |
|
Target DB engine | void SetTargetDBEngine(pRCESDBEngine targetDBEngine); |
Is sychronous replication | void SetIsSync(bool isSync); |
Warning threshold | void SetWarningThreshold(int warningThreshold); |
Error threshold |
|
Latency |
|
Latency time |
|
Latency rev |
|
Latency rev time |
|
Log change details |
|
Parallel apply |
|
Check dependencies |
|
Sync log writes |
|
Analyzer threads count |
|
Apply threads count |
|
File mask |
|
Return if the replication plan has already been deployed |
|
Return if the replication plan is pulling (agent running on target) |
|
replication plan is pulling (agent running on target) |
|
replication plan is transforming partitioned source files into non-partitioned target files |
|
replication plan is transforming partitioned source files into non-partitioned target files |
|
Return if during the deployment only the data files are copied and the index will be rebuilt |
|
Source log position |
|
Target log position |
|
Source transaction ID |
|
Target transaction ID |
|
Source Replication Manager agent identification NoteThis is linked to |
|
Target Replication Manager agent identification NoteThis is linked to |
|
Replication direction |
|
Return if the replication monitor feature is active |
|
Time that the replication monitor has been enabled or disabled |
|
Replication refresh rate |
|
Return if the replication exception log monitor is active |
|
Time that the replication exception log monitor has been enabled or disabled |
|
Return if the replication function profiling is active |
|
Time that the replication function profiling has been enabled or disabled |
|
Return if the replication is paused |
|
Time that the replication has been paused or resumed |
|
Replication has a filter on the source file to be replicated |
|
Replication file filter |
|
Flag indicating if the replication plan contains any non-acknowledged exceptions |
|
Flag indicating if the replication plan is amid an exception dump process |
|
Replication batch size ( NoteThis c-tree replication-specific setup. |
|
Replication debug minimum log position ( NoteThis c-tree replication-specific setup. |
|
Replication exception mode ( NoteThis c-tree replication-specific setup. |
|
Replication lock retry count ( NoteThis c-tree replication-specific setup. |
|
Replication lock retry sleep ( NoteThis c-tree replication-specific setup. |
|
Replication read timeout ( NoteThis c-tree replication-specific setup. |
|
Replication remember log position ( NoteThis c-tree replication-specific setup. |
|
Replication conflict detection ( NoteThis c-tree replication-specific setup. |
|
Class
FCREPLReplStat
A replication plan statistic entity has a set of monitoring information specific for a given replication plan.
Getters
replication plan direction (original or reverse) |
|
replication plan state |
|
Inherited getters
replication plan identification NoteThis is linked to FCREPLReplPlan class. |
|
Direction |
|
Statistic time |
|
Return if source DBEngine is connected |
|
Return if target DBEngine is connected |
|
Transaction log file number |
|
Transaction log position |
|
State |
|
Statistic sequence number |
|
Statistic function name |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Replication latency |
|
Setters
replication plan direction (original or reverse) |
|
replication plan state |
|
Statistic function name |
|
Inherited setters
replication plan identification NoteThis is linked to the |
|
Direction |
|
Statistic time |
|
Return if source DBEngine is connected |
|
Return if target DBEngine is connected |
|
Transaction log file number |
|
Transaction log position |
|
State |
|
Statistic sequence number |
|
Function name |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Number of |
|
Replication latency |
|
Class
FCREPLReplParallelStat
A replication plan statistic entity has a set of monitoring information specific for a given replication plan.
Getters
replication plan direction (original or reverse) |
|
Replication |
|
Replication |
|
Replication dependency state |
|
Replication analyzer list |
|
Replication apply list |
|
Setters
replication plan direction (original or reverse) |
|
Replication |
|
Replication |
|
Replication dependency state |
|
Replication analyzer list |
|
Replication apply list |
|
Class
FCREPLReplParallelAnalyzer
A replication plan analyzer statistic entity has a set of monitoring information specific to a given replication plan.
Getters
Replication state |
|
Setters
Replication state |
|
Class
FCREPLReplParallelApply
A replication plan apply statistic entity has a set of monitoring information specific to a given replication plan.
Getters
Replication state |
|
Setters
Replication state |
|
Class
FCREPLReplExcep
A replication plan exception entity has an exception event detail information for a replication plan.
Getters
replication plan direction (original or reverse) |
|
Inherited getters
replication plan identification NoteThis is linked to |
|
Replication direction |
|
Replication exception sequence number |
|
Replication exception time |
|
Transaction number |
|
Transaction log entry time |
|
Transaction log file number |
|
Transaction log position |
|
File identification |
|
Replication operation name |
|
Exception error code |
|
File name |
|
Setters
replication plan direction (original or reverse) |
|
Replication operation name |
|
File name |
|
Inherited setters
replication plan identification NoteThis is linked to |
|
Replication direction |
|
Replication exception sequence number |
|
Replication exception time |
|
Transaction number |
|
Transaction log entry time |
|
Transaction log file number |
|
Transaction log position |
|
File identification |
|
Operation |
|
Exception error code |
|
File name |
|
Class
FCREPLReplFunc
A replication plan function timing entity has the profiling information by function call for a specific replication plan.
Getters
Getters are not applicable.
Inherited getters
Replication function name |
|
Total percentage of time spent on this function |
|
Total time spent on this function |
|
Number of calls for this function |
|
Average time spent on this function call |
|
Setters
Replication function name |
|
Inherited setters
Name |
|
Total percentage of time spent on this function |
|
Total time spent on this function |
|
Number of calls for this function |
|
Average time spent on this function call |
|
Class
FCREPLReplAgent
A Replication Agent entity refers to an existing Replication Agent physically set based on the previous technology (ctreplagent
).
Getters
Getters are not applicable.
Inherited getters
Action identification for the Replication Agent NoteThis is linked to the FCREPLAction class. |
|
Replication Agent opSystem identification NoteThis is linked to the |
|
Replication Agent path |
|
Replication Agent name |
|
Source server connection string |
|
Target server connection string |
|
Source server node identification |
|
Source server node identification |
|
Error code |
|
Error message |
|
replication plan name |
|
replication plan description |
|
Publication identification NoteThis is linked to the |
|
Publication name |
|
Publication description |
|
Publication database identification NoteThis is linked to the |
|
Subscription name |
|
Subscription description |
|
Subscription database identification NoteThis is linked to the |
|
Setters
Replication Agent path |
|
Replication Agent name |
|
Source server connection string |
|
Target server node identification |
|
Source server node identification |
|
Target server node identification |
|
Error message |
|
Inherited setters
Action identification for the Replication Agent NoteThis is linked to the |
|
Replication Agent opSystem identification NoteThis is linked to the |
|
Path |
|
Name |
|
Source server |
|
Target server |
|
Source node ID |
|
Target node ID |
|
Error code |
|
Error message |
|
Retrieve all the replication plan entity objects.
Prototype
FCREPL_API int fcReplGetReplPlans(pFCREPLConn replConn, ppFCREPLReplPlan *replPlanList, int *replPlanCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Replication plan entity list |
| Number of replication plan entities in the list |
Return
Error code
Add a replication plan entity into the database. If there already is a replication plan with the given name, update the existing record.
Prototype
FCREPL_API int fcReplPersistReplPlan(pFCREPLConn replConn, pFCREPLReplPlan replPlan);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| replication plan entity to be persisted |
Return
Error code
Delete the replication plan by its identification.
Prototype
FCREPL_API int fcReplRemoveReplPlan(pFCREPLConn replConn, int replPlanID, bool recursive);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| replication plan identification |
| Recursive flag |
Return
Error code
Deploy an existing replication plan. Make sure that the target file is up-to-dated and then start the replication.
Prototype
FCREPL_API int fcReplDeploy(pFCREPLConn replConn, int replPlanID, bool forceReplace, int *actionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
| Flag indicating that we should replace existing target files |
| Action identification for the FS load action |
Return
Error code
Start an existing replication plan already deployed.
Prototype
FCREPL_API int fcReplStart(pFCREPLConn replConn, int replPlanID, const char *sourceLogPos, const char *targetLogPos, bool ignoreDeploy, int *actionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
| Source log position to start at |
| Target log position to start at |
| Flag indicating if we should check that the Replication has been deployed before starting it |
| Action identification for the FS load action |
Return
Error code
Stop an existing replication plan already deployed/started.
Prototype
FCREPL_API int fcReplStop(pFCREPLConn replConn, int replPlanID, int *actionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
| Action identification for the FS load action |
Return
Error code
Check if the replication deployed is ok or has any errors.
Prototype
FCREPL_API int fcReplCheck(pFCREPLConn replConn, int replPlanID, bool checkConn, ppFCREPLReplPlan *replPlanList, int *replPlanCount, int *actionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
| Check connection flag |
| replication plan list entity object |
| Number of replication plan objects in the list |
| Action identification returned in case of |
Return
Error code
Cancel the current replication plan action for deployment or start or stop.
Prototype
FCREPL_API int fcReplCancel(pFCREPLConn replConn, int replPlanID, int actionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
| Replication action identification |
Return
Error code
Start monitoring a replication plan. It starts loading some statistics snapshots by a frequency defined by refreshRate
and also all the exception logs that happened to start at the current time into the Replication Manager. If the replication plan is bi-directional, it will start monitoring both directions.
Prototype
FCREPL_API int fcReplStartMonitor(pFCREPLConn replConn, int replPlanID, int refreshRate);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
| Refresh rate in seconds use for determining the frequency of the logged statistics snapshots |
Return
Error code
Stop monitoring a replication plan. The history of what has already been monitored will be kept in Replication Manager, but from this point, it will stop logging snapshots, If the replication plan is bi-directional, it will stop monitoring both directions.
Prototype
FCREPL_API int fcReplStopMonitor(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Retrieve the statistics for the replication plan for a given period of time. The snapshot is retrieved for direct, reverse, or both directions.
Prototype
FCREPL_API int fcReplGetStats(pFCREPLConn replConn, int replPlanID, FCREPLDateTime begin, FCREPLDateTime end, int statListSize, int statStart, ppFCREPLReplStat *statList, int *statCount, int *totalReplStats);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| replication plan identification |
| Begin time for the statistics retrieval |
| End time for the statistics retrieval |
| Statistics list count to be retrieved |
| Statistics list start record |
| Statistics entity list |
| Number of statistics entities in the list |
| Total statistics |
Return
Error code
Start logging replication plan's exceptions. It starts loading all the exceptions from the given replication plan into Replication Manager. This status is stored in the replication plan's table. It is started by default when the replication plan is started.
Prototype
FCREPL_API int fcReplStartExcepLog(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Stop logging a replication plan's exceptions. The history of what has already been logged will be kept in the Replication Manager, but from this point, it will stop logging exceptions.
Prototype
FCREPL_API int fcReplStopExcepLog(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Retrieve the exceptions for the replication plan for a given period of time. The snapshot is retrieved for direct, reverse, or both directions.
Prototype
FCREPL_API int fcReplGetExceptions(pFCREPLConn replConn, int replPlanID, FCREPLDateTime begin, FCREPLDateTime end, int excepListSize, int excepStart, ppFCREPLReplExcep *excepList, int *excepCount, int *totalReplExceps);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| replication plan identification |
| Begin time for the statistics retrieval |
| End time for the statistics retrieval |
| Exception list count to be retrieved |
| Exception list start record |
| Exception entity list |
| Number of exception entities in the list |
| Total exceptions |
Return
Error code
Start collecting function timing for a given replication plan execution.
Prototype
FCREPL_API int fcReplPlanFuncTimeStart(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Stop collecting Function Timing for a given replication plan execution.
Prototype
FCREPL_API int fcReplPlanFuncTimeStop(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Reset the function timing information collected for a given replication plan execution.
Prototype
FCREPL_API int fcReplPlanFuncTimeReset(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Retrieve the function timing information for a given replication plan execution.
Prototype
FCREPL_API int fcReplPlanGetFuncTimes(pFCREPLConn replConn, int replPlanID, ppFCREPLReplFunc *sourceFuncList, int *sourceFuncCount, ppFCREPLReplFunc *targetFuncList, int *targetFuncCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| replication plan identification |
| Source function timing list |
| Source function timing count |
| Target function timing list |
| Target function timing count |
Return
Error code
Pause a given replication plan execution.
Prototype
FCREPL_API int fcReplPlanPause(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Resume a given replication plan execution.
Prototype
FCREPL_API int fcReplPlanResume(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Retrieve the next available default name for a replication plan.
Prototype
FCREPL_API int fcReplGetTempName(pFCREPLConn replConn, char *tempReplPlanName);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| JSON with the temporary replication plan name |
Return
Error code
Retrieve all the current Replication Agents by the given criteria.
Prototype
FCREPL_API int fcReplScanAgent(pFCREPLConn replConn, int osID, const char *basePath, ppFCREPLReplAgent *replAgentList, int *replAgentCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| OpSystem identification |
| Base path to start the scan |
| Replication agent list |
| Number of Replication Agents in the list |
Return
Error code
Import a list of Replication Agent setups into Replication Manager.
Prototype
FCREPL_API int fcReplImportAgent(pFCREPLConn replConn, bool simpleMode, ppFCREPLReplAgent replAgentList, int replAgentCount);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Flag indicating if the import is supposed to be executed for simple mode (some default values are assumed) |
| Replication Agent list |
| Number of Replication Agents in the list |
Return
Error code
Acknowledge all the Replication exceptions up to the current moment of a given replication plan execution.
Prototype
FCREPL_API int fcReplAckExceptions(pFCREPLConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Existing replication plan identification |
Return
Error code
Resync of published files.
Prototype
FCREPL_API int fcReplResyncFiles(pFCREPLConn replConn, int replPlanID, int *fileIDList, int fileCount, int *actionID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| replication plan identification |
| Existing published file identification list |
| Number of published files to be added |
| Action identification for the resync action |
Return
Error code
Retrieve all the archived replication plan entity objects.
Prototype
FCREPL_API int fcReplGetArchivedReplPlans(pFCREPLConn replConn, ppFCREPLReplPlan *replPlanList, int *replPlanCount);
Parameters
Parameter | Description |
---|---|
| replication plan entity list |
| replication plan entity list |
| Number of replication plan entities in the list |
Return
Error code
Archive replication plan.
Prototype
FCREPL_API int fcReplPlanArchive(pRCESConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| Replication plan identification |
Return
Error code
Restore replication plan.
Prototype
FCREPL_API int fcReplPlanRestore(pRCESConn replConn, int replPlanID);
Parameters
Parameter | Description |
---|---|
| Replication connection handle |
| replication plan identification |
Return
Error code