SAP HANA

Version 26.1.9516


SAP HANA


You can use the SAP HANA connector from the CData Sync application to capture data from SAP HANA and move it to any supported destination. To do so, you need to add the connector, authenticate to the connector, and complete your connection.

Add the SAP HANA Connector

To enable Sync to use data from SAP HANA, you first must add the connector, as follows:

  1. Open the Connections page of the Sync dashboard.

  2. Click Add Connection to open the Select Connectors page.

  3. Click the Sources tab and locate the SAP HANA row.

  4. Click the Configure Connection icon at the end of that row to open the New Connection page. If the Configure Connection icon is not available, click the Download Connector icon to install the SAP HANA connector. For more information about installing new connectors, see Connections.

Authenticate to SAP HANA

After you add the connector, you need to set the required properties.

  • Connection Name - Enter a connection name of your choice.

  • Server - Enter the name of the server that runs SAP HANA.

  • Port - Enter the port number for SAP HANA. The default port value is 39013.

CData Sync supports authenticating to SAP HANA in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

Password

To connect with your user credentials, set the following properties:

  • Auth Scheme: Select Password.

  • User: Enter the username that you use to authenticate to your SAP HANA account.

  • Password: Enter the password that you use to authenticate to your SAP HANA account.

Okta

To connect with single sign-on (SSO) via Okta, specify the following properties:

  • Auth Scheme: Select OKTA.

  • User: Enter the username that you use to authenticate to your Okta account.

  • Password: Enter the password that you use to authenticate to your Okta account.

  • SSO Login URL: Enter the login URL that is used by your SSO provider.

  • SSO Properties: Enter a semicolon-separated list of the single sign-on (SSO) properties that you want to use (for example, SSOProperty1=Value1;SSOProperty2=Value2;…).

Kerberos

To connect with Kerberos, specify these settings:

  • Auth Scheme - Select Kerberos.

  • User - Enter the username that you use to authenticate to your SAP HANA account.

  • Password - Enter the password that you use to authenticate to your SAP HANA account.

  • Kerberos KDC - Enter the host name or IP address of your Kerberos Key Distribution Center (KDC) machine.

  • Kerberos Realm - Enter the Kerberos realm that you use to authenticate to Kerberos.

  • Kerberos SPN - Enter the service principal name (SPN) for the Kerberos domain controller.

  • Kerberos User - Enter the principal username (in the format Host/User@Realm) for the Kerberos domain controller.

  • Kerberos Keytab File (optional) - Enter the full file path to your Kerberos keytab file.

  • Kerberos Ticket Cache (optional) - Enter the full file path to an MIT Kerberos credential cache file.

Trigger-Based Change Data Capture for SAP HANA

CData Sync supports trigger-based change data capture (CDC) for SAP HANA sources.

When trigger-based CDC is enabled, Sync creates database triggers on the selected source tables by using the permissions that are granted to the Sync database user. These triggers capture INSERT, UPDATE, and DELETE operations and write each change to a centralized change-log table, which Sync reads to replicate data efficiently and reliably.

When trigger-based CDC is enabled, Sync performs the following actions:

  • creates INSERT, UPDATE, and DELETE triggers on each selected source table

  • captures row-level changes as they occur

  • writes a record for each change to a global change-log table

CDC Change-Log Table

All triggers that are created for CDC write to a single global change-log table:

  • Schema: _CDATA

  • Table: _CDC_TRG_CHANGE_LOG

This table is shared across all tracked tables and stores the complete row image for every change. For UPDATE operations, both the before and after values are recorded. For DELETE operations, all available row values are preserved to ensure complete change visibility and correct downstream replication.

Authentication

Trigger-based CDC for SAP HANA supports only the Password authentication scheme.

Prerequisites

Before you enable trigger-based CDC for SAP HANA, ensure that the following requirements are met:

  • Minimum driver version: The CData SAP HANA driver version must be 25.0.9511 or later.

  • Schema support: Tables that reside in system schemas are not supported. Schemas that match the patterns SYS and SYS_* are treated as system schemas and cannot be used for trigger-based CDC.

  • Database permissions: The database user that is specified in the SAP HANA connection must have the following privileges:

    Catalog access:

    GRANT CATALOG READ TO <ReplicationUser>;
    

    Source schema privileges:

    GRANT SELECT ON SCHEMA <source_schema> TO <ReplicationUser>;
    GRANT TRIGGER ON SCHEMA <source_schema> TO <ReplicationUser>;
    

    Change-log schema privileges (_CDATA):

    The CDC engine writes change events to the _CDATA._CDC_TRG_CHANGE_LOG table. The required permissions depend on whether the replication user owns the _CDATA schema.

    • The user owns the _CDATA schema: No additional grants are required. The user automatically has full privileges on objects in schemas that the user owns.

    • The user does not own the _CDATA schema: Grant SELECT and DELETE privileges on the _CDATA schema, as follows:

      GRANT SELECT, INSERT, DELETE ON SCHEMA _CDATA TO <ReplicationUser>;
      

These privileges allow Sync to read system metadata, create and execute triggers on the selected source tables, and read from and maintain the _CDATA._CDC_TRG_CHANGE_LOG change-log table for CDC processing..

Unsupported Data Types

Trigger-based CDC does not support columns that use the following SAP HANA data types:

  • TEXT

  • BINTEXT

  • ST_POINT

  • ARRAY

SAP HANA does not allow triggers to reference these data types. As a result, columns that use these types are excluded from change capture.

Enable Trigger-Based CDC for SAP HANA

To enable trigger-based CDC for a SAP HANA source in Sync:

  1. Create or edit a Sync job that uses SAP HANA as the source.

  2. Select the source tables that you want to replicate.

  3. Enable CDC for the job, as explained in Creating a CDC Job in CData Sync

    • Note: During job initialization, Sync creates the required triggers and the _CDATA._CDC_TRG_CHANGE_LOG table if they do not already exist.
  4. Run the job to begin capturing and replicating change events.

After CDC is enabled, Sync continuously reads from the change-log table and applies INSERT, UPDATE, and DELETE operations to the destination.

Trigger Management

The CDC engine automatically manages triggers for each task in the job, as follows:

  • When a table is added to a job, Sync creates the corresponding INSERT, UPDATE, and DELETE triggers.

  • When a task or an entire job is removed, Sync checks whether any remaining jobs still reference the same source tables. If no other jobs require those tables, Sync drops the corresponding triggers.

Data Retention

The _CDATA._CDC_TRG_CHANGE_LOG table is shared by all CDC-enabled jobs. Sync provides the following job-level properties to control retention and cleanup:

  • changelog.retention.hours—Specifies how long change records are retained in the change-log table. The default retention time is 168 hours (seven days).

  • changelog.cleanup.interval.minutes—Specifies how often Sync scans the change-log table and removes expired records. The default interval is 60 minutes.

SAP Client Filtering

In SAP ERP and SAP S/4HANA environments, client-dependent tables include the MANDT column, which stores the SAP client identifier.

To capture changes for a specific SAP client, you can set the sap.client.id job property (the default value is null).

When this property is set, Sync filters change events based on the value of the MANDT column and processes only the rows that belong to the specified client.

Complete Your Connection

To complete your connection:

  1. Specify the following properties:

    • Database (optional) - Enter the name of your SAP HANA database.

    • Schema (optional) - Enter the schema for your SAP HANA database.

    • Include System Objects - Select whether you want to fetch HANA System schema and tables. The default value is False.

    • Use SSL - Select whether you want to enable Secure Sockets Layer (SSL). The default value is False.

  2. Define advanced connection settings on the Advanced tab. (In most cases, though, you should not need these settings.)

  3. Click Create & Test to create your connection.

More Information

For more information about interactions between CData Sync and SAP HANA, see SAP HANA Connector for CData Sync.