Updated on 2026-09-14 GMT+08:00

Heartbeat Table Format

The heartbeat table must contain the dlf_job_id, external_job_id, and heartbeat fields. The primary key name must be dlf_job_id.

The following table lists the data types of the fields corresponding to each data source.

Table 1 Data types of the fields corresponding to each data source

Field

MySQL Type

Oracle Type

SQL Server Type

PostgreSQL/GaussDB Type

Description

dlf_job_id

VARCHAR(128)

VARCHAR2(128)

NVARCHAR(128)

VARCHAR(128)

Primary key, which is the ID of a real-time migration job

external_job_id

VARCHAR(128)

VARCHAR2(128)

NVARCHAR(128)

VARCHAR(128)

ID of the underlying real-time migration job

heartbeat

BIGINT

NUMBER(20, 0)

BIGINT

BIGINT

Heartbeat time, which is the UTC time when the system generates heartbeat data for the synchronization job. The unit is millisecond.

  • MySQL
    CREATE TABLE `your_db_name`.`your_heartbeat_table_name` (
      `dlf_job_id` VARCHAR(128) PRIMARY KEY,
      `external_job_id` VARCHAR(128),
      `heartbeat` BIGINT
    )
  • PostgreSQL/GaussDB
    CREATE TABLE "your_schema_name"."your_heartbeat_table_name" (
      "dlf_job_id" VARCHAR(128) PRIMARY KEY,
      "external_job_id" VARCHAR(128),
      "heartbeat" BIGINT
    )
  • Oracle
    CREATE TABLE "your_schema_name"."your_heartbeat_table_name"(
      "dlf_job_id" NVARCHAR2(128) PRIMARY KEY,
      "external_job_id" NVARCHAR2(128),
      "heartbeat" NUMBER(20, 0)
    )

    After an Oracle heartbeat table is created (including automatic table creation by a job), enable supplemental logging for the heartbeat table. Otherwise, data in the heartbeat table cannot be synchronized.

    ALTER TABLE "your_schema_name"."your_heartbeat_table_name" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS

  • SQL Server
    CREATE TABLE [your_schema_name].[your_heartbeat_table_name] (
          [dlf_job_id] NVARCHAR(128) PRIMARY KEY,
      [external_job_id] NVARCHAR(128),
      [heartbeat] BIGINT
      )

    After a SQL Server heartbeat table is created (including automatic table creation by a job), enable CDC for the heartbeat table. Otherwise, data in the heartbeat table cannot be synchronized.

    EXEC sys.sp_cdc_enable_table
          @source_schema = N'your_schema_name',   
          @source_name = N'your_heartbeat_table_name',-- Table name
          @role_name = NULL,   
          @supports_net_changes = 0;