The reset command sets the position from which a process continues the next time it is run. For an Apply Process it is the LSN of a transaction in the trail files of its Capture Process, which the Apply Process then applies or skips. For a Capture Process it is the LSN (SQL Server) or the SCN (Oracle) in the Source Database from which the changes are captured, or the current one. The process has to be stopped.
Be careful: the transactions between the old and the new position are applied again (Apply), or are not captured at all when the position is moved forward (Capture). A transaction that is applied again can fail with a duplicate key error. After a Capture Process has skipped changes the Target Database does not have them: compare the data and repair it (see Data Comparison) or load the tables again.
With skip=1 the Apply Process leaves out the whole transaction with the LSN: all the rows that it changed in all the tables, not only the row or the statement that failed. A transaction can hold thousands of rows, so much more data than the failed row can be missing in the Target Database. Look at the transaction before you leave it out: the command report with the LSN at both ends lists its tables, with the numbers of inserts, updates and deletes (see Report Process). Use skip=1 when there is no other way, and compare and repair the tables that the report listed (see Data Comparison). When the transaction fails because a column or a table is missing in the Target Database, a rule of the Apply Process that leaves it out is a smaller step: the transaction is then applied without it (see Apply and Target Databases).
repcli reset process=apply id=applyID lsn=LSN skip=0|1repcli reset process=capture id=captureID lsn=LSN|now| Parameter | Description |
|---|---|
| process | apply or capture. |
| id | The identifier of the process. |
| lsn | The position. An LSN is written as 0x followed by 20 hexadecimal digits in capital letters, for example 0x000000450000007B0004. An Oracle SCN can be written as a decimal number, Repstance converts it to an LSN. For an Apply Process the LSN has to be the LSN of a transaction in the trail files of the Capture Process. For a Capture Process now means the current LSN or SCN of the Source Database at the moment when the process is run next. |
| skip | Apply Process only, required. 0 – start at the transaction with the LSN. 1 – start after it. |
The command returns at once. The process shows RESET (Completed) when it is done; it stays stopped, run it to continue from the new position (see Run any Capture or Apply Processes). The command is refused for a process that is running: stop it first (see Stop any Capture or Apply Processes).
Make an Apply Process start after the transaction with the last applied LSN:
repcli reset process=apply id=1 lsn=0x0000008D00007D030007 skip=1
[In Process]: Command [RESET] has been sent. Use [status] command to monitor the processMake an Apply Process start with a transaction:
repcli reset process=apply id=1 lsn=0x0000008D000079CB0007 skip=0
[In Process]: Command [RESET] has been sent. Use [status] command to monitor the processThe status of the Apply Process after the reset:
repcli status process=apply
Apply Process 1, Transactions Provider (Capture): demo_cap, DB: APPLYDB, Server: db-tgt.example.com
RESET (Completed), Waiting for the Next Command
Last Source DB Change : 2026/10/20 15:52:00.153 UTC (0x0000008D00007D030007)
Last Applied DB Change : 2026/10/20 15:52:00.153 UTC (0x0000008D00007D030007)
Lag : 00:00:00.000
Total since 2026/10/20 15:50:05.613 UTC (0x0000008D00007B910007):
Processing the Transactions : 00:00:00.000
Waiting for Transactions : 00:00:00.000
Transactions : 16 (DDL: 0, Delete: 16, Insert: 16, Update: 0)Make a Capture Process continue from the current position of the Source Database:
repcli reset process=capture id=1 lsn=now
[In Process]: Command [RESET] has been sent. Use [status] command to monitor the processThe Capture Process does not look for the current position when the command is given: it starts from the position that the Source Database has when the process is run. The changes made between the reset and the run are not captured. After the process has been run, the line “Total since” of status shows for a SQL Server Source Database the position 0x00000000000000000000, until the process is stopped and run again (for an Oracle Source Database it shows the position where the process started):
repcli status process=capture
Capture Process 1, Name: demo_cap, DB: AdventureWorksDW2019, Server: db-src.example.com
RUN (In Process), Waiting for Transactions
Last Source DB Change : 2026/10/20 15:34:00.253 UTC (0x0000008D00007B6B0007)
Last Captured DB Change : 2026/10/20 15:34:00.253 UTC (0x0000008D00007B6B0007)
Total since 2026/10/20 15:31:00.000 UTC (0x00000000000000000000):
Processing the Transactions : 00:00:00.006
Waiting for Transactions : 00:01:32.801
Average Speed (ops) : 304.456
Transactions : 1 (DDL: 0, Delete: 1, Insert: 1, Update: 0)The messages when the command is refused. repcli prints them at once:
| Message | Cause |
|---|---|
| Process status is [In Process]. Command [RESET] is not valid for this status | The process is running. Stop it first. |
| An invalid value [0x1234] has been supplied for parameter [lsn] | The LSN is not 0x with 20 hexadecimal digits in capital letters, and not a decimal number. |
| An invalid value [2] has been supplied for parameter [skip] and Valid values are: 0 and 1 | The value of skip is not 0 or 1. |
| Invalid number of parameters | A parameter is missing: an Apply Process needs process, id, lsn and skip, a Capture Process process, id and lsn. |
The Apply Process looks for the LSN after the command has been accepted, so the answer of the command is In Process also when the LSN is not in the trail files. The result is in the status of the process: it shows RESET (Failed) with a message that names the first LSN that is available. Reset the process again with an LSN from the trail files:
repcli status process=apply
Apply Process 1, Transactions Provider (Capture): demo_cap, DB: APPLYDB, Server: db-tgt.example.com
RESET (Failed), Waiting for the Next Command, LSN 0x000000450000007B0004 has not been found. Available LSN/LSNs: 0x0000008B0001FFA60007
Last Source DB Change : 2026/10/20 15:27:00.790 UTC (0x0000008D00007ABB0007)
Last Applied DB Change : 2026/10/20 15:21:00.553 UTC (0x0000008D00007A340007)
Lag : 00:06:00.237
Total since 2026/10/20 15:18:17.936 UTC (0x0000008D000079CB0007):
Processing the Transactions : 00:00:00.000
Waiting for Transactions : 00:00:00.000
Transactions : 5 (DDL: 0, Delete: 5, Insert: 5, Update: 0)The body of the request. The pairs are in this order; the pair skip is only for an Apply Process:
{
"command": "reset",
"parameters": [
["process", "apply"],
["id", "1"],
["lsn", "0x0000008D00007D030007"],
["skip", "1"]
]
}The body of the answer is one object (not an array):
{
"command": "RESET",
"status": "In Process",
"message": "Command [RESET] has been sent. Use [status] command to monitor the process"
}| HTTP code | Meaning |
|---|---|
| 200 | The request is valid. The status is In Process, or Failed if the process cannot be reset now, for example because it is running. |
| 401 | The token is invalid. |
| 422 | The request is invalid: the JSON, the command, a parameter, or the process is unknown. |
Stop the process first (see Stop/Run Replication Processes): a running process cannot be reset. Then click “More” on the card of the process:
The window of the process opens. Click “Reset” at the bottom of the window:
The window “Reset Apply Process” opens. Enter the LSN. Tick “Skip” to start after the transaction with this LSN, leave it unticked to start with it. Click “Reset”:
The window “Reset Capture Process” has no “Skip”. Enter an LSN, or now to continue from the current position of the Source Database, and click “Reset”:
“Show JSON” shows the request that the button sends, the one that is described under REST API above, and “Copy” copies it. The LSN is required: the Web UI only checks that the field is filled in.
When the server accepts the reset, the process stays stopped at the new position. The window shows it as Stopped; repcli status shows RESET (Completed). Click “Run Process” to continue from the new position:
If the Apply Process does not find the LSN in the trail files, the window shows the process as Failed with the message and the first LSN that is available. Click “Reset” again and enter an LSN from the trail files:
The Web UI does not show a message when the server refuses a reset, for example because the process is running or the LSN is not valid: the window closes and nothing changes. Check the state of the process in the window, or send the command with repcli to see the message.
Prev page:
Status of any Capture or Apply ProcessesNext page:
Report Process