There are three commands that are used to control the Capture and Apply Processes. They are :
Each of these commands can be used to control a single Process, a group of Processes or all Processes. The default is to run “All” the Processes that are available to be run, stopped or get the status of, if no additional “Parameters” are specified.
The syntax used for these commands is:
repcli run|stop|status [process=(capture|apply) [id=processID]]
Here are some examples of using run command.
This command will “run” everything (all existing Capture and Apply Processes):
repcli run
This command will “run” all Capture Processes:
repcli run process=capture
This command will “run” a single specified Capture Process:
repcli run process=capture id=1
The command format is identical in use for both the “stop” and “status” commands.
This command is used to “Run” either a single Capture or Apply Process or a group of either Capture, or Apply Processes or all configured Processes. The default is to run all Processes that are available to be run, if no additional “Parameters” are specified.
As part of the “run” command, Repstance carries out background checks to ensure that Source and/or Target Databases are properly configured with the necessary functionality to enable the Capture and/or Apply Processes to run. In the event that either of the Databases are not properly configured, it will display an error message listing the inconsistencies.
At the “first time” run of the Capture Process for MS SQL database it creates CDC tables needed for the replication and start extracting the changes from the first available LSN generated in the CDC tables.
For the Oracle database at the “first time” run the “current database SCN” is used as the start point of the replication.
Note – If there are any active transactions were running at the “current database SCN”, and these transactions are committed after this SCN, the ALL changes generated by these transactions are included into the replication, so the tables will be in consistent state and no data is missed.
If the previously defined Objects (see chapter 7.4.4 Capture Objects Specification) are changed or the Transformation Rules (see chapter 7.4.7 Transformation Rules and Triggering Order) are altered, at this point all the DDL and DML changes will be re-implemented using the new criteria.
If any Objects are no longer configured for Capture Process the “run” command will “Turn Off” CDC on these Objects and they will no longer be written to the Trail Files – the reverse is true i.e. if new Objects are specified then the “run” command will enable CDC for them and they will now be written to the Trial Files.
If this is the “First time” an Apply Process has been run, it isonlyat this point that data from the specified Capture Process will be written to the Target Database using the first available LSN in the Trail File generated by this Capture Process.
The Apply Process can be configured to use a specific LSN from a Capture Process as a start point, i.e it can be configured to use any available LSN from a Trail File, but this is done by using the “reset” command (see chapter 7.13 Reset Apply Process).
If the specified Capture Process either is not configured or has never been run, the Apply Process will fail.
REST API:
Server response:
CLI Syntax:
repcli run process=apply|capture id=processID
The input parameters are:
The output parameters are:
This command is used to stop either a single Capture or an Apply Process or a group of either Capture, or Apply Processes or all configured Processes. The default is to stop everything that is running, if no additional parameters are specified.
REST API:
Server response:
CLI Syntax:
repcli stop process=apply|capture id=processID
The input parameters are:
The output parameters are:
This command is used to show the status of either a single Capture or an Apply Process or a group of either Capture, or Apply Processes or all configured Processes. The default is to show the status of every Process that is running, if no additional parameters are specified.
REST API:
Server response:
CLI Syntax:
repcli status process=apply|capture id=processID
The input parameters are:
The output parameters are:
The AverageSpeed parameter is average number of records processed per second (calculated value).
The Lag parameter is the latency (delay) between the last record processed and the timestamp of the last transaction in Source Database - calculated value. The Lag is valid only in the case that the corresponding Capture Process is running. In repcli it is displayed in HH:MM:SS.FFF format.
The following example shows statuses of all existing Processes:
[http://localhost :8796/] repcli>status
Capture Process 1, Name: repv1, DB: mcdb, Server: source.repstance.com
RUN (In Process), Waiting for Transactions
Last Source DB Change : 2019/03/10 21:47:00.610 UTC (0x000000E300001A750004)
Last Captured DB Change : 2019/03/10 21:47:00.610 UTC (0x000000E300001A750004)
Total since 2019/03/10 21:43:00.367 UTC (0x000000D400000A850004):
Processing the Transactions : 00:00:02.214
Waiting for Transactions : 00:04:00.565
Average Speed (ops) : 45168.973
Transactions : 12 (DDL: 2, Delete: 4, Insert: 100016, Update: 0)
Apply Process 1, Transactions Provider (Capture): repv1, DB: mcdb, Server: target.repstance.com
RUN (In Process), Waiting for Transactions
Last Source DB Change : 2019/03/10 21:47:00.610 UTC (0x000000E300001A750004)
Last Applied DB Change : 2019/03/10 21:47:00.610 UTC (0x000000E300001A750004)
Lag : 00:00:00.000
Total since 2019/03/10 21:44:00.696 UTC (0x00000000000000000001):
Processing the Transactions : 00:00:09.230
Waiting for Transactions : 00:03:23.067
Average Speed (ops) : 10836.252
Transactions : 12 (DDL: 2, Delete: 4, Insert: 100016, Update: 0)
The following example shows status of Capture Processes:
[http://localhost :8796/] repcli>status process=capture
Capture Process 1, Name: cap1, DB: prod1, Server: source.repstance.com
RUN (In Process), Waiting for Transactions
Last Source DB Change : 2019/03/05 19:58:00.283 UTC (0x0000006F00004C900004)
Last Captured DB Change : 2019/03/05 19:58:31.103 UTC (0x0000006F00005C340003)
Total since 2019/03/05 19:58:00.283 UTC (0x0000006F00004C900004):
Processing the Transactions : 00:00:00.588
Waiting for Transactions : 00:00:01.165
Loading the Data : 00:00:04.926
Average Load Speed (ops) : 190907.891
Average Speed (ops) : 0.000
Transactions : 0 (DDL: 0, Delete: 0, Insert: 0, Update: 0)
Loaded Objects : 2 (Rows: 940416)
Prev page:
7.14 Remove Apply ProcessNext page:
8. WORK WITH REPSTANCE USING WEB UI