SAP HANA
TwinCommit captures changes from SAP HANA by reading the HANA redo log through a log reader. Changes are grouped by transaction and applied at commit, in commit order. It works for S/4HANA, BW/4HANA and custom schemas, and installs no triggers or shadow tables.
Supported: SAP HANA 2.0 SPS 05 and later · SAP HANA Cloud · single-container and multi-tenant (MDC) systems.
Prerequisites
Section titled “Prerequisites”Log mode
Section titled “Log mode”The database must keep redo logs until they are backed up:
-- checkSELECT VALUE FROM M_INIFILE_CONTENTS WHERE FILE_NAME = 'global.ini' AND SECTION = 'persistence' AND KEY = 'log_mode';-- set (requires a full data backup afterwards)ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM') SET ('persistence', 'log_mode') = 'normal' WITH RECONFIGURE;Technical user
Section titled “Technical user”CREATE USER TWINCOMMIT PASSWORD "********" NO FORCE_FIRST_PASSWORD_CHANGE;ALTER USER TWINCOMMIT DISABLE PASSWORD LIFETIME;GRANT LOG ADMIN TO TWINCOMMIT;GRANT CATALOG READ TO TWINCOMMIT;GRANT SELECT ON SCHEMA SAPHANADB TO TWINCOMMIT;Log backup retention
Section titled “Log backup retention”TwinCommit reads from log backups when it falls behind the online log. Keep log backups available on the backup catalog location for at least as long as your longest planned outage.
Configuration
Section titled “Configuration”source: type: saphana host: hana-prod.internal port: 30015 tenant: PRD user: TWINCOMMIT password: ${HANA_PASSWORD} log_backup_path: /hana/backup/log/DB_PRDHow capture works
Section titled “How capture works”- The log reader decodes redo entries for the tables listed in
tables:and reconstructs row images. - Transactions are released at commit; rolled-back transactions are discarded.
- Snapshots use a consistent read at a recorded log position, then streaming resumes from that position.
Limitations
Section titled “Limitations”- Column-store and row-store tables are supported. Virtual tables and calculation views are not.
- Tables without a primary key are not supported.
- Changes made with
IMPORTorALTER TABLE ... LOADthat bypass the redo log mark the table as broken.