All Products
Search
Document Center

PolarDB:Migration cutover

Last Updated:Nov 25, 2026

After data migration and thorough business testing are complete, you enter the last step of the migration project: business cutover. This is the critical moment to switch your application traffic from the source Oracle database to the PolarDB for PostgreSQL (Compatible with Oracle) cluster. Without a thorough plan and risk contingency plan, a hasty switchover may cause business interruption or data inconsistency. This document provides a standardized cutover process that, with clear steps and a reliable rollback mechanism, helps you minimize business downtime and ensure that the entire switchover is secure, smooth, and controllable.

Cutover methods

The core of the migration cutover is to point the database connections of your applications to the new PolarDB cluster. Two mainstream cutover methods are provided. You can choose one based on your project specifics and requirements for data consistency.

Method

Core operations

Advantages

Disadvantages/costs

Source business downtime

Smooth cutover based on the existing synchronization link (recommended)

Use the DTS task that has been running during testing to directly switch services.

Efficient and fast.

No need to re-synchronize the full data, which greatly shortens the preparation time before the cutover.

/

Short (minutes)

Note

The final downtime is the same for both methods, but this method requires a longer preparation period.

Cutover after creating a new synchronization link

Before the cutover, clear the target database and create a new DTS task (schema migration + full migration + incremental migration). Switch services after the task catches up with the data.

Highest certainty.

Starting from a brand-new, clean data snapshot completely eliminates any potential data discrepancy risks that may have been introduced during long-term testing.

Time-consuming and complex.

Requires extra time to complete a new full data synchronization and involves more operation steps.

The entire cutover process consists of two stages:

  • The first stage is to prepare a stable and reliable forward synchronization link.

  • The second stage is to perform the general switchover and finalization process.

Before the cutover in the second stage, we recommend that you use DTS to create a reverse synchronization link from the PolarDB cluster to the source Oracle database. This link is your most important safety net: if any serious problem is found after you switch to PolarDB, you can calmly switch services back to the source Oracle database. During this period, data generated on the new database has been synchronized back to the old database through this link, effectively preventing data loss.

Prerequisites

Before you start the cutover, make sure that all the following conditions are met:

  • DTS task is stable: You already have a DTS task from the source Oracle database to thePolarDB cluster, and the task has entered the incremental migration stage with latency stable at the second level.

  • Testing is complete: You have completed comprehensive business function and performance regression testing on thePolarDB test instance and confirmed that all functions meet expectations with no compatibility issues.

  • Maintenance window is confirmed: You have identified, based on your business, a period with the lowest traffic as the official cutover maintenance window.

  • Rollback plan is ready: You have planned a complete plan to switch back to the source Oracle database in an emergency, including the rollback method for application configurations.

Precautions

  • Before switching the connection endpoints, you must stop all application services that write data to the source Oracle database to prevent new data writes at the moment of switchover, which would cause data inconsistency.

  • Before the business runs stably on the PolarDB cluster for a full cycle (for example, 24 hours or longer), do not release the reverse synchronization task or shut down the source Oracle database.

Stage 1: Prepare a forward synchronization link

In this stage, choose a method based on your business situation and testing strategy to prepare the data synchronization link for the final cutover.

Smooth cutover based on the existing synchronization link (recommended)

This is the most common and efficient method.

  • Use cases

    During the entire test and verification period, you kept a DTS incremental synchronization task running from the source Oracle database to the PolarDB cluster.

  • Detailed operations

    1. Confirm the link status: Before the planned cutover date, continuously monitor the DTS task.

    2. Ensure stability: Make sure that the task runs properly and that the incremental synchronization latency is stable at the second level.

    3. When the preceding conditions are met, your forward synchronization link is ready, and you can directly proceed to the general cutover process in the second stage.

Cutover after creating a new synchronization link

This method provides a cleaner starting point but involves more operation steps.

  • Use cases

    • The test period is too long, and you are concerned about undetected data inconsistency.

    • The original DTS synchronization task has been interrupted or is unavailable for some reason.

    • You want to use a brand-new and certain data snapshot as the cutover basis.

  • Detailed operations

    1. Clear the target database: In the target PolarDB cluster, delete all previously migrated data and objects to restore an empty database.

    2. Create a new DTS task: Refer to the steps in Data migration to create a DTS task from the source Oracle database to the PolarDB cluster. Set the migration types to schema migration + full migration + incremental migration.

    3. Wait for the task to catch up: Wait for the new task to complete full migration and enter the stable incremental synchronization stage (latency at the second level).

    4. When the preceding conditions are met, your forward synchronization link is ready, and you can proceed to the general cutover process in the second stage.

Stage 2: Perform the cutover and finalization process

Regardless of the method you chose in the first stage, once you have a stable, low-latency forward synchronization link, the subsequent switchover, rollback preparation, and finalization steps are exactly the same.

Create and start a reverse synchronization link

This is the key to cutover safety. Complete this step before the cutover maintenance window starts.

Refer to the steps in Data migration to create a new DTS task from the PolarDB cluster to the source Oracle database. Set the migration type to incremental migration.

Perform the switchover within the maintenance window

During the planned off-peak hours, strictly follow this order:

  1. Stop application writes: Stop all application services that write data to the source Oracle database.

  2. (Optional) Perform final data validation: Compare the row counts of core business tables again precisely to ensure that the data is completely consistent.

  3. Update the sequence values of the destination database: On the DTS task management page, in the Incremental Write module, click Sync Sequence, and set the Offset. DTS generates sequence synchronization statements and executes the sequence value synchronization.

  4. Switch application connections: Modify the database connection configuration of application services to point to the PolarDB for PostgreSQL (Compatible with Oracle) cluster's connection endpoint.

  5. Start the applications and verify: Start the application services, verify core business functions, and confirm that read and write operations are normal.

Observe and finalize

  1. Business observation: Let the business run on the new database for at least one full business cycle (for example, 24 hours) and monitor closely.

  2. Confirm stability: Confirm that the new system has no issues.

  3. (Optional) Delete the hidden primary key column: If the objects to migrate include tables that have neither a primary key nor a unique key, and Add a hidden primary key for a table without a primary key/a table without a unique key is set to Yes. After you switch services to the destination database and before the DTS instance ends or is released, you must, on the Full Data Migration or Incremental Write module, on the Basic Information tab, in the Actions column, click Delete Invisible Primary Key to manually delete the hidden primary key added by DTS.

    Important

    After the hidden primary key is deleted, you must ensure data consistency by yourself.

  4. Release DTS tasks:

    1. Stop and release the reverse synchronization DTS task and then the forward synchronization DTS task in sequence to stop billing and prevent the tasks from unexpectedly restarting and overwriting data.

    2. Finally, take the original Oracle database offline and release it at an appropriate time.