Remove Process

The remove command deletes a Capture Process or an Apply Process. It can only be carried out when the process is not running: stop it first (see Stop any Capture or Apply Processes). The command cannot be undone. Any Apply Process that reads the trail files of a removed Capture Process stops working.

Make a copy of the trail files, the configuration and the checkpoint files before you remove a process (see Backup Repstance Files).

What is deleted

ProcessDeletedNot deleted
Capture ProcessThe trail files, the files of the Initial Load and of the data comparison tasks, the configuration of the process and its checkpoint. For a SQL Server Source Database the CDC is switched off on the tables that only this process captures, if the database can be reached.The log files. The objects that prepare database has created in the Source Database.
Apply ProcessThe configuration of the process and its checkpoint rows in the Target Database.The trail files, they belong to the Capture Process. The log files. The tables of the Target Database and the objects that prepare database has created.

Command line (repcli)

repcli remove process=capture|apply id=processID
ParameterDescription
processcapture or apply.
idThe identifier of the process.

Remove a Capture Process. The status is Completed and the warnings tell what could not be removed; they follow each other without a line break. Here the database of the process cannot be reached, and the process has never been run, so it has no checkpoint file:

repcli remove process=capture id=2
[Completed]: Capture 2 has been removed
lookup db-src.example.com on 10.0.0.5:53: no such hostWarning: Failed to remove checkpoint file [remove captureckpt.2: no such file or directory]

Remove an Apply Process whose database cannot be reached:

repcli remove process=apply id=2
[Completed]: Warning: Failed to remove DB objects
Apply 2 has been removed

A process that is running is refused with the message Can not remove the active process. A process that does not exist is refused with Invalid Process ID has been supplied.

REST API

  • Endpoint: https://repstance_url/configure/process
  • Method: POST
  • Header: Content-Type: application/json and X-Token: token

The body of the request:

{
  "command": "remove",
  "parameters": [
    ["process", "capture"],
    ["id", "2"]
  ]
}

The body of the answer. The status is Completed when the process has been removed; the message tells what could not be removed:

{
  "Status": "Completed",
  "Message": "Capture 2 has been removed\nlookup db-src.example.com on 10.0.0.5:53: no such hostWarning: Failed to remove checkpoint file [remove captureckpt.2: no such file or directory]"
}
HTTP codeMeaning
200The process has been removed. The message can hold warnings.
401The token is invalid.
422The request is invalid or the process is running. The status is Failed and the message tells why.

Web UI

Stop the process, click “Edit” on its card and then “Delete”, and confirm. The steps, and the button “Cleanup Repstance Objects” that must not be used while a process works with the database, are described in Remove Replication Configuration.