All Products
Search
Document Center

Data Transmission Service:Update the starting values of sequences in the destination database

Last Updated:Mar 28, 2026

When DTS synchronizes or migrates data incrementally, sequences in the destination database continue generating values independently from the source. This drift can cause primary key conflicts if the destination sequence produces a value that already exists in the migrated data. Use the sequence value adjustment feature to read the current sequence values from the source database, add an offset you specify, and set the result as the starting value of each corresponding sequence in the destination database.

For example, with an offset of 10,000: if a sequence in the source database is currently at 12,345, DTS sets the starting value of the matching sequence in the destination database to 22,345.

Supported database pairs

PostgreSQL in the following table refers to either an ApsaraDB RDS for PostgreSQL instance or a self-managed PostgreSQL database.
Source databaseDestination databaseReference
PostgreSQLPostgreSQL, PolarDB (Compatible with Oracle), or PolarDB for PostgreSQLSynchronize data from a PostgreSQL database / Migrate data from a PostgreSQL database
PolarDB for PostgreSQLPostgreSQL or PolarDB for PostgreSQLSynchronize data from a PolarDB for PostgreSQL cluster / Migrate data from a PolarDB for PostgreSQL cluster
PolarDB (Compatible with Oracle)PolarDB (Compatible with Oracle)One-way data synchronization between PolarDB for PostgreSQL (Compatible with Oracle) clusters / Migrate data between PolarDB for PostgreSQL (Compatible with Oracle) clusters
OraclePolarDB (Compatible with Oracle)Synchronize data from a self-managed Oracle database to a PolarDB for PostgreSQL (Compatible with Oracle) cluster / Migrate data from a self-managed Oracle database to a PolarDB for PostgreSQL (Compatible with Oracle) cluster

Prerequisites

Before you begin, make sure that:

  • The instance involves incremental data synchronization or migration

  • The instance is in the Incremental Data Migration or Incremental Data Synchronization phase

  • The Status of the instance is Running or Paused

Limitations

  • Not supported for two-way synchronization instances.

  • By default, DTS updates the starting value of a sequence in the destination database based on the current value of a sequence with the same name in the source database. Adjusting individual sequences is not supported.

  • If incremental data is written to the source database after the starting values of sequences in the destination database are updated, the updated sequence values may not meet your expectations.

Update sequence starting values

  1. Go to the Data Synchronization or Data Migration page.

    Use the DTS console

    1. Log on to the DTS console. In the left-side navigation pane, click Data Synchronization or Data Migration. In the top navigation bar, select the region where your DTS instance resides.

    Use the DMS console

    Note

    The actual navigation may vary based on the Data Management (DMS) console mode and layout. For details, see Simple modeand Customize the layout and style of the DMS console.

    1. Log on to the DMS console. In the top navigation bar, choose Data + AI > DTS (DTS) > Data Synchronization or Data + AI > DTS (DTS) > Data Migration. From the drop-down list to the right of Data Synchronization Tasks or Data Migration Tasks, select the region where your DTS instance resides.

  2. Find your DTS instance and click the instance ID.

  3. On the Task Management page, click Incremental Write.Data Management (DMS)

  4. On the Basic Information tab, click Synchronize Sequence.

  5. In the dialog box, set the Sequence Offset value.

  6. Click Synchronize. After the update completes, the Synchronized message appears and the sequence values before and after the update are displayed.

  7. Click Close.