Alter Process

The alter command changes the parameters of a Capture Process or an Apply Process, or removes them. The process has to exist. The id cannot be changed, and the name of a Capture Process and the capturename of an Apply Process can be set only once: the command is refused when they have a value already. The parameters that can be changed depend on the process and its database, see the pages of the parameters of Prepare Capture Process and Prepare Apply Process.

A process that is running can be altered, but the changes are used only after the process has been stopped and run again (see Stop any Capture or Apply Processes; stop with restart=1 does both).

Command line (repcli)

repcli alter process=capture|apply id=processID [dbtype=databaseType] list_of_the_parameters_to_change [preview={0|1}]
ParameterDescription
process, idThe process. Required.
dbtypeThe type of the database of the process. It is optional, Repstance takes it from the stored process.
the parameters to changeA parameter that is not in the command keeps its value. The names and the values are the ones of the pages of the parameters.
parameter=defaultThe value default removes any parameter from the configuration of the process, so that the default of the product is used again.
map=defaultCapture Process only: removes all the transformation rules. Rules that come with the same command are added after that.
map=mapID,default, filter=filterID,defaultRemoves one transformation rule or one filter.
preview1 lists the tables and the rules that the new settings give, and saves nothing.

Change the parameters of a Capture Process, the list of the tables whose data is captured and the detail of the log:

repcli alter process=capture id=2 dmlinclude=dbo.%,sales.% debuglevel=1
[Completed]: Capture 2 has been altered

Reload the table dbo.mytable1 and tell the Apply Processes to truncate it before the data is loaded (see Initial Load):

repcli alter process=capture id=2 loadinclude=dbo.mytable1:T
[Completed]: Capture 2 has been altered

Change the password of an Apply Process:

repcli alter process=apply id=2 password=NewPassw0rd123
[Completed]: Apply 2 has been altered

Remove a parameter. The process uses the default again and show does not list it any more:

repcli alter process=capture id=2 debuglevel=default
[Completed]: Capture 2 has been altered

Add a transformation rule to a Capture Process, and remove all of them (see Objects Mapping and Possible Transforms):

repcli alter process=capture id=2 map=1,rule=(dbo.%:report.%),description="sample 1"
[Completed]: Capture 2 has been altered
repcli alter process=capture id=2 map=default
[Completed]: Capture 2 has been altered

Remove one transformation rule of an Apply Process. map=default works for a Capture Process only:

repcli alter process=apply id=4 map=1,default
[Completed]: Apply 4 has been altered

The command is refused when it gives another name to a Capture Process, or another capturename to an Apply Process, that has one already, and when a parameter does not exist (the answer goes on with the list of the valid parameters):

repcli alter process=capture id=2 name=Other
[Failed]: Parameter name can not be altered
repcli alter process=apply id=2 capturename=Other
[Failed]: The [capturename] parameter can't be altered
repcli alter process=capture id=2 foo=1
[Failed]: An invalid parameter [foo] has been supplied.
Valid parameters for a capture process, source database mssql:
  ...

The answer for a process that is running tells that the changes wait for the restart:

repcli alter process=capture id=1 debuglevel=0
[Completed]: Capture 1 has been altered. The configuration will be used after process restart

Preview

With preview=1 the command does not save anything. It lists the tables that the new settings select, and the transformation rules that are applied to them. It works with prepare too. The Web UI uses it for “Show results”, “Preview Objects” and “Preview Transforms” in the Replication Object Wizard. The columns show whether the DML, the DDL and the Initial Load of the table are captured. Here dmlinclude=dbo.DimG% would capture the data of dbo.DimGeography only, while the DDL of the two other tables is still captured by ddlinclude:

repcli alter process=capture id=1 dmlinclude=dbo.DimG% preview=1
[Completed]:

                                                                      [Replication Tables]
                                                                      --------------------

                                       TABLE_NAME |    [DML]    |    [DDL]    |    [Load]   |
---------------------------------------------------------------------------------------------
                                  dbo.DimCurrency |      -      |      +      |      -      |
                                  dbo.DimCustomer |      -      |      +      |      -      |
                                 dbo.DimGeography |      +      |      -      |      -      |
---------------------------------------------------------------------------------------------

REST API

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

The body of the request. A parameter is a [name, value] pair, a transformation rule is a pair like ["map=1", "rule=(dbo.%:report.%)"], and ["map=1", "default"] removes it:

{
  "command": "alter",
  "parameters": [
    ["process", "capture"],
    ["id", "2"],
    ["debuglevel", "1"]
  ]
}

The body of the answer:

{
  "Status": "Completed",
  "Message": "Capture 2 has been altered"
}

With ["preview", "1"] the answer lists the tables instead of a message: dmltables, ddltables and loadtables are the tables whose data is captured, whose DDL is captured and that are loaded, and maptables are the transformation rules for them. A list that is empty is left out:

{
  "Status": "Completed",
  "Message": "",
  "dmltables": ["dbo.DimGeography"],
  "ddltables": ["dbo.DimCurrency", "dbo.DimCustomer"]
}
HTTP codeMeaning
200The request is valid and has been processed. The body has the status Completed and the message; for validate the status is Valid or Invalid.
401The token is invalid.
422The 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.

Web UI

Click “Edit” on the card of the process, change the form and click “Save Process”. For a running process the Web UI offers “Restart Now”, which stops and runs the process, or “Restart Later”. The parameters that are not on the form are changed in “Advanced Settings”: a row that you delete is sent with the value default. The form is described in Edit Replication Processes and the choice of the tables in the Replication Object Wizard.