Skip to content

Oracle

TwinCommit captures changes from Oracle by parsing online redo logs and archived logs directly. It reassembles transactions in SCN order, including across RAC threads, and needs no LogMiner session, triggers or extra objects in your schemas.

Supported: Oracle 19c, 21c and 23ai; RAC; CDB/PDB; Data Guard physical standby as a log source.

SELECT log_mode FROM v$database; -- must be ARCHIVELOG
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;

For tables without a primary key, add table-level logging on a unique key:

ALTER TABLE sales.orders ADD SUPPLEMENTAL LOG DATA (UNIQUE) COLUMNS;
CREATE USER c##twincommit IDENTIFIED BY "********" CONTAINER=ALL;
GRANT CREATE SESSION, SET CONTAINER TO c##twincommit CONTAINER=ALL;
GRANT SELECT ANY DICTIONARY TO c##twincommit CONTAINER=ALL;
GRANT SELECT ON v_$log TO c##twincommit;
GRANT SELECT ON v_$logfile TO c##twincommit;
GRANT SELECT ON v_$archived_log TO c##twincommit;
GRANT FLASHBACK ANY TABLE TO c##twincommit; -- consistent snapshots
GRANT SELECT ANY TABLE TO c##twincommit; -- or per-table SELECT

TwinCommit reads redo and archive logs either from a mounted path (local or NFS) or over the database connection with log_access: sql.

source:
type: oracle
dsn: oracle://c##twincommit:${ORA_PASSWORD}@orahost:1521/ORCLCDB
pdb: SALESPDB
log_access: direct # direct | sql
archive_dirs: [/u01/arch]
  • LONG and LONG RAW columns must be excluded. BLOB and CLOB are supported up to 16 MiB per value.
  • Tables using hybrid columnar compression are not supported.
  • Transparent Data Encryption requires the wallet to be available to TwinCommit.