What to do when a Capture Process cannot start, stops, or captures nothing, and when the Source Database is not ready. The status of a failed Capture Process shows the error in brackets after the state (see Status of any Capture or Apply Processes). The same text is in the process log and in Incident Management of the Web UI (see Logs and Information for Support). A Capture Process runs the checks of validate database every time it starts, so every message of that command can also appear as RUN (Failed).
The message is the error of the database. For SQL Server it is unable to open tcp connection with host 'db-src.example.com:1433': dial tcp 10.0.0.5:1433: i/o timeout or login error: Login failed for user. For Oracle it starts with username="repuser" sid="db-src.example.com:1521/service" and ends with an ORA- error (for example ORA-12541, no listener, or ORA-01017, invalid user name or password). Incident Management shows it as Unable to connect to database.
The host name, the port or the service name is not right, something between the two servers blocks the connection (a firewall, or the security group of the instance), or the user or the password is not right. Check from the Repstance server that the host name resolves and that the port can be reached, then correct the parameters with alter and run the process again.
The server does not find the Oracle Instant Client. Install the Oracle Instant Client (64-bit) on the Repstance server, make sure that its directory is known to the dynamic linker (the directory in a file of /etc/ld.so.conf.d, then ldconfig), and restart the Repstance service. The Instant Client 23ai connects to Oracle Database 19c and later only, so use the 19c client for an older database.
The checks of validate database (see Validate Database) decide whether a Capture Process can start. The usual messages:
| Message | What to do |
|---|---|
| No privileges were granted for "object" object | Grant the user the privilege on the object. The lists are in Database Privileges |
| Archive log mode is not enabled | The administrator of the Oracle database has to switch it to ARCHIVELOG mode. prepare database does not do it |
| Minimum Database-level Supplemental Logging is not enabled | Run prepare database=source, or enable the supplemental logging of the database |
| "REPI" user does not exist, ARCHIVELOG_DIR directory does not exist, ONLINELOG_DIR directory does not exist | Run prepare database=source. On a container database the user is C##REPI (see Database Privileges) |
| DB[x] has not been found. Available DBs are: [...] | The parameter dbname has to be the name of a container (pluggable database) in the list that the message gives |
| Database is not prepared for capture: [CDC is not enabled: 1] | SQL Server: run prepare database=source dbtype=mssql. The other numbers (2 to 17) name the next missing object of Repstance, and the same command creates it |
| SQL Server Agent is not running: 101 | Start SQL Server Agent. The CDC jobs run in it |
On AWS and Azure the Data Comparison and the parameter asyncredo=1 need an instance with at least 32 GB of RAM. The messages are Data comparison needs an instance with at least 32 GB of RAM (this instance has 15.5 GB) and, for the Capture Process that runs without the asynchronous mode, Async redo mode (asyncredo=1) needs an instance with at least 32 GB of RAM. See Requirements and Limits and Oracle Capture Parameters.
The Capture Process fails and its status shows RUN (Failed) with the reason. The text depends on the mode. With asyncredo=1 it is Sync Error: [the redo log file does not exist: ... The database lists it but it is not on the disk (purged or deleted), so the capture cannot continue from this SCN: ...]. Without it, Missed logfile for sequence [1234] (directlogmode=0, LogMiner) or Missed logfile for [thread#, sequence] [1,1234] (directlogmode=1 or 2) means that the Source Database lists the log without a file name. When the database lists the log with its name and the file is gone, the status shows the error of the Source Database about opening the file, for example ORA-22288: file or LOB operation FILEOPEN failed.
A log that the Capture Process has not read yet was deleted (by RMAN, by a retention setting, on Amazon RDS by the retention of the archived logs), or the directories ARCHIVELOG_DIR and ONLINELOG_DIR do not point at the files, or the user may not read them. The server runs the failed process again every 5 minutes, at most restartattempts times, and each run fails in the same way.
What to do: restore the log from the backup (for example with RMAN) to the place where the database lists it, and run the process again. Nothing is lost then. When the log cannot be restored, the changes in it cannot be captured: restart the Capture Process from the current position of the Source Database, as described below, and repair the Target Database afterwards. To prevent it, keep the archived logs until the Capture Process has read them.
Use it when the redo log or the archived log that the Capture Process needs cannot be restored. The Capture Process then continues with the changes that are made from the moment it is run. The changes in the missing logs are not captured, and the Target Database does not get them.
repcli stop process=capture id=1
repcli reset process=capture id=1 lsn=now
repcli run process=capture id=1
repcli status process=captureThe position is taken when the process is run, not when the command is given, so the changes made between the reset and the run are not captured either.
A transaction that is open in the Source Database when the Capture Process starts is read from its beginning, so that it is captured completely. When the beginning of such a transaction is in the log that is missing, the Capture Process fails again with the same kind of message. Wait until the transaction has ended and repeat the steps. Or reset the Capture Process to an SCN after the missing logs, a decimal number that you take from the Source Database (the column CURRENT_SCN of V$DATABASE), for example lsn=2468013579. A transaction that is open at that SCN is captured only from the SCN on, so what it changed before is lost.
The Apply Processes need no action: they continue with the trail files that the Capture Process writes after the restart. Nothing marks the gap in the trail files and no message reports it, so the Target Database misses the changes of the gap. Compare the tables and repair them (see DATA COMPARISON). The repair inserts the rows that are missing and updates the rows that differ, but it does not delete the rows that exist only in the Target Database, so the rows that were deleted in the gap stay: load such tables again with the Initial Load (see Initial Load).
A DDL statement that was run in the Source Database in the gap is not replicated. Compare the structure of the replicated tables and make the same change in the Target Database; otherwise the Apply Process stops with the error of a missing column (see Apply and Target Databases).
The Capture Process stops with Not enough space left on device [/opt/repstance/trail] when less than 250 MB are free in the file system that holds the trail directory. Free the space, and see that the Apply Processes run, because they delete the trail files that they have applied (the parameter cleanuptrail, see Housekeeping). The server runs a failed process again at most restartattempts times; run it yourself when they are used up.
A message such as [invalid argument] or [open captureckpt.1: permission denied] with Write CDC data error, Write Metadata error or Write checkpoint error means that the trail files or the checkpoint file cannot be written. invalid argument often hides the real error. Check that the directory /opt/repstance/trail exists, that the user repstance may write in it and in /opt/repstance (files that were restored by root belong to root), and that the disk is not full.
The line Capture checkpoint [captureckpt.1] is corrupted or doesn't exist in the log is normal when a Capture Process is run for the first time. When it appears for a Capture Process that has run before, the checkpoint file captureckpt.{id} in /opt/repstance is lost. A Capture Process of a SQL Server Source Database rebuilds it from the trail files. A Capture Process of an Oracle Source Database starts like a new one, at the current SCN of the Source Database, so the changes made in the meantime are not captured: restore the file from the backup (see Backup Repstance Files), or reset the process to the position that you need and repair the data.
The status RUN (In Process), Waiting for Transactions with zero counters means that the Capture Process finds no matching change. Check in this order:
Incident Management shows No data is provided by CDC jobs with the errors that the CDC jobs of the database have reported since the last start. The CDC capture job does not run or fails. Start SQL Server Agent and the job, and read the error that the incident gives.
The message Initial Load failed for table [x]. Error: ... names the table and gives the error of the Source Database. The log and Incident Management (Initial Load error) have it. Remove the cause and load the table again (see Initial Load).
Prev page:
Access and Product ValidationNext page:
Apply and Target Databases