Repstance replicates data with two kinds of processes. A Capture Process extracts the changes from the Source Database and writes them to trail files on the Repstance server. An Apply Process reads the trail files of a Capture Process and applies the changes to the Target Database; it can also change the data and the data definition when transformation rules are configured. The commands of this section create these processes, show and change their configuration, check them and remove them.
| Command | What it does | Page |
|---|---|---|
| prepare | Creates a Capture Process or an Apply Process. | Prepare Capture Process, Prepare Apply Process |
| show | Shows the configuration that is stored for a process. | Show Process |
| validate | Checks that a process can run: its parameters, the connection and the database objects. | Validate Process |
| alter | Changes the parameters of a process, or removes them. | Alter Process |
| remove | Deletes a process, its files and the database objects it has created. | Remove Process |
The commands that run and stop the processes and show what they are doing are in PROCESS CONTROL COMMANDS. The commands that prepare the databases are in DATABASE CONFIGURATION COMMANDS.
The Web UI leads through the same steps, see Setup First Replication.
| Capture Process | Apply Process |
|---|---|
| The id and the name of the process | The id of the process and the name of the Capture Process that provides the data |
| The connection to the Source Database and the capturing method | The connection to the Target Database |
| The tables to replicate and the kind of replication, DML and DDL (see Capture Objects Specification) | How the DDL is processed |
| The tables to load first (see Initial Load) | The filtering rules, if required (see Objects Filtering) |
| The global transformation rules, if required (see Objects Mapping and Possible Transforms) | The local transformation rules, if required (see Objects Mapping and Possible Transforms) |
| The parameters of the extraction | The parameters that tune the process |
repcli prints the answer of a command as [Completed]: message, [Valid]: message, [Invalid]: message or [Failed]: message. The messages of a command that is refused:
| Message | Cause |
|---|---|
| Missed dbtype parameter and Valid values: mssql | oracle | mysql | postgresql | redshift | snowflake | s3 | kafka | prepare without dbtype. A Capture Process takes mssql, oracle, mysql or postgresql. |
| Process id=2 already exists | prepare with the id of another process of the same kind. |
| [SQLServerCap2] is already user by 2 capture | prepare with the name of another Capture Process (the product writes “user”). |
| Invalid Process ID has been supplied | show, validate, alter or remove with an id that does not exist. |
| An invalid value [70000] has been supplied for parameter [port]. and a line that describes the parameter | A value that the parameter does not accept. |
| An invalid parameter [foo] has been supplied. and the list of the valid parameters of this process and database | A parameter that does not exist. |
| An invalid parameter [s3.bucketname] has been supplied. It is a parameter of redshift, s3, not of mssql. | A parameter of another database. |
| Parameter [name] has been provided more than 1 time | The same parameter twice in one command. |
The five commands are POST requests to /configure/process. The body is JSON, the header X-Token carries the token of the Repstance server (see Configure repcli for Remote Access and REST API). The element command is the name of the command and parameters is a list of [name, value] pairs, the same names as in repcli. The answer has the fields Status and Message, and parameters for show or the lists of tables for preview. The bodies and the answers are on the pages of the commands. The HTTP codes:
| HTTP code | Meaning |
|---|---|
| 200 | The request is valid and has been processed. The body has the status Completed and the message; for validate the status is Valid or Invalid. |
| 401 | The token is invalid. |
| 422 | The request is invalid or cannot be carried out: the JSON, the command, a parameter or the id of the process is wrong, or the process is running (remove). The body has the status Failed and the message. |
The processes are created and changed on the dashboard. “Add Capture” and “Add Apply” open the configuration forms (see Setup First Replication), “Edit” opens the form of an existing process, with “Validate”, “Save Process” and “Delete” (see Edit Replication Processes and Remove Replication Configuration), and the tables and the rules are chosen in the Replication Object Wizard.
Prev page:
Remove Repstance Objects from DatabaseNext page:
Prepare Capture Process