All Products
Search
Document Center

PolarDB:Oracle online migration

Last Updated:Nov 25, 2026

Migrating an Oracle database to a heterogeneous database is a complex and challenging task. Compatibility, performance, and migration methods are the core concerns of customers. To help you complete migration tasks systematically and reliably, PolarDB provides the Oracle online migration capability and a standardized end-to-end migration solution. The solution covers four stages: assessment, data migration, test verification, and business cutover. It provides mature tools such as ADAM, DTS, and traffic replay to assist with migration tasks. This solution aims to break down a complex migration process into a series of clear and controllable steps, helping you minimize migration risks and business impact and achieve a smooth and efficient database migration.

Features

The Oracle online migration solution is a full-lifecycle service that covers prerequisites through post-migration verification. It standardizes the entire migration process into four core stages, and each stage provides automated tool support, ensuring the rigor and determinism of the process.

  • Stage 1: Assessment

    • Core tool: Heterogeneous database compatibility assessment (ADAM)

    • Objective: Before the migration, use ADAM to collect and assess your source Oracle database. After the assessment, a detailed assessment report is generated, including compatibility analysis of database objects and SQL and potential migration risk warnings. This helps you estimate the reconstruction workload and develop an overall migration plan.

  • Stage 2: Data migration

    • Core tool: Data Transmission Service (DTS)

    • Objective: Use DTS to securely and reliably synchronize the schema, full data, and subsequent incremental data changes of the source Oracle database to the targetPolarDB cluster. DTS supports online incremental data migration and can continuously replicate data without interrupting the source-side business, laying the foundation for a smooth cutover.

  • Stage 3: Test verification

    • Core tool: Traffic replay

    • Objective: After data synchronization, use business regression testing and automated traffic replay to compare the execution efficiency of read and write requests and verify the consistency of execution results. Traffic replay can capture real SQL traffic from the source production environment, simulate and replay it on the target database, and compare the results, identifying SQL compatibility issues and performance differences, ensuring the success rate of business cutover.

  • Stage 4: Business cutover

    • Core tool: Data Transmission Service (DTS)

    • Objective: Within the scheduled maintenance window, smoothly switch application traffic from the source Oracle database to the targetPolarDB cluster. We recommend that you create a reverse synchronization link from PolarDB to the source Oracle database before the cutover, and start the reverse synchronization task first. Then switch business traffic to PolarDB. Keep the reverse synchronization running for one business cycle. After verifying that there are no issues, you can release the task and the source Oracle database. The reverse synchronization link keeps data consistent between the target and the source. If problems occur after the cutover, you can switch back to Oracle.

Benefits

  • Standardized process: Provides an end-to-end, standardized operation process from assessment to cutover, making complex migration projects clear and controllable.

  • Risks identified early: Comprehensive pre-migration assessment identifies compatibility issues and performance risks in advance, avoiding huge remediation costs in the late stage of migration.

  • Minimal business impact: Supports full and incremental data synchronization, enabling data migration without interrupting business and shortening the downtime of the final cutover to minutes.

  • Sufficient verification: Tests with real production traffic replay cover edge cases that manual testing can hardly reach, ensuring system stability and data accuracy after migration.

  • Secure and rollback-capable: Provides a reverse synchronization link as a rollback safeguard. Even if problems occur after the switchover, you can quickly switch back to the source database with zero data loss.

Billing

The billing rules for the services involved in the Oracle online migration solution are as follows:

  • Assessment (ADAM): Free.

  • Data migration (DTS):

    • Schema migration and full migration: free.

    • Incremental migration: billed. The fee depends on the link specification you select. You are not billed while the task is paused or has failed.

    • Data validation: billed. The fee is calculated based on the volume of validated data.

  • Test verification (traffic replay):

    • The traffic replay feature itself is free.

    • You need to prepare an ECS instance to deploy the agent. The ECS instance is billed according to its own pricing.

Migration process overview

Stage 1: Assessment

Before the migration, comprehensively assess the current status of the source Oracle database and identify potential risks and workload.

  1. Choose a collection method: Based on your network environment, choose to collect source database information in online or offline mode.

    • Online collection: applicable when the source database has a public IP address.

    • Offline collection: applicable to isolated intranet environments. You must download the collector and run it locally.

  2. Create a database profile: Upload the collected data to ADAM to create a visualized database profile. The profile presents the database from multiple dimensions such as performance, capacity, and complexity, and intelligently identifies objects of concern such as tables without primary keys and rapidly growing tables.

  3. Create a compatibility assessment: Based on the database profile, set the target database toPolarDB for PostgreSQL (Compatible with Oracle) and create an assessment project.

  4. Interpret the assessment report: After the assessment is complete, the system generates a detailed report that includes:

    • Object and SQL compatibility: explicitly lists incompatible objects and SQL statements and provides modification suggestions.

    • Changes and workload: summarizes all tasks that require manual changes and grades them by difficulty.

    • Migration risks: warns about performance or functional risks that may occur during migration.

Stage 2: Data migration

After the assessment and necessary changes are complete, use Data Transmission Service (DTS) to synchronize data.

  1. Prerequisites:

    • Account authorization:

      • Self-managed Oracle database: schema migration and full migration require the Schema owner permission. Incremental migration requires fine-grained authorization.

      • PolarDB for PostgreSQL (Compatible with Oracle): Schema owner permission.

    • Network preparation: Make sure that the DTS server can access the source and target databases, and configure whitelists as needed.

    • Enable archiving and supplemental logging: If you need incremental migration, you must enable Archive Log and Supplemental Logging in the source Oracle database.

  2. Create a DTS migration task:

    • In Oracle Online Migration, create a data migration task.

    • Select Oracle as the source database and PolarDB (Compatible with Oracle) as the target database.

    • Enter the connection information and account credentials for the source and target databases as prompted.

  3. Configure migration objects and types:

    • Migration types: Usually select schema migration, full migration, and incremental migration to achieve migration without downtime.

    • Migration objects: Select the schemas or specific tables to migrate.

  4. Precheck and start: Before the task starts, DTS performs a precheck. After you fix all failed items, purchase and start the task.

  5. Monitor the task status: After the task starts, DTS goes through the schema migration, full migration, and incremental migration stages in sequence. During incremental migration, monitor the migration latency. When the latency is stable at the second level, the source and target databases are basically in sync.

Stage 3: Test verification

While data migration is ongoing, comprehensively testing the target database is the core step to ensure a smooth business cutover.

  1. Business regression testing (required): Because this is a heterogeneous database, we recommend that you perform sufficient business regression testing. On the targetPolarDB for PostgreSQL (Compatible with Oracle) cluster, run complete business regression test cases that cover all core functions to ensure compatibility and functional correctness.

  2. Traffic replay (optional; does not affect the cutover):

    • Traffic collection: On the source Oracle database, use the dedicated tools provided byPolarDB to capture real SQL traffic over a period of time (such as peak hours) and parse it into traffic files.

    • SQL traffic replay: In Oracle Online Migration, create a traffic replay task to replay the collected traffic files on the targetPolarDB cluster. This step verifies SQL compatibility at scale, compares the execution time of SQL on the source and target databases, and identifies performance regressions.

    • SQL result verification: Create a result comparison task. The tool executes the same query SQL on both the source and target databases, compares the returned results one by one, and automatically flags any data inconsistency.

Stage 4: Migration cutover

This is the last step of the migration project. Switch application traffic to thePolarDB for PostgreSQL (Compatible with Oracle) cluster.

  1. Create a reverse synchronization link: Before the cutover, we recommend that you create a DTS reverse synchronization link fromPolarDB to the source Oracle database. This link is your rollback safeguard, ensuring that you can safely switch back to the source database without data loss if problems occur after the cutover.

  2. Switch over within the maintenance window:

    • Stop application writes: During off-peak hours, stop all application services that write data to the source Oracle database.

    • Final data synchronization and verification: Wait until the latency of the forward DTS task drops to 0. Manually trigger sequence synchronization again, and perform a final consistency check on core data.

    • Switch application connections: Modify the database connection configuration of application services to point to the connection endpoint of the targetPolarDB cluster.

    • Start the applications and verify: Start the application services, verify core business functions, and confirm that business reads and writes are normal.

  3. Observe and finalize:

    • Let the business run on the new database for at least one complete business cycle.

    • After confirming that the system is stable with no issues, stop and release the reverse and forward DTS tasks.

    • Finally, take the source Oracle database offline and release its resources at an appropriate time.

FAQ

Will sequences in Oracle be synchronized automatically?

No, they are not continuously synchronized automatically. DTS synchronizes the current value of sequences only once during schema migration. To avoid primary key conflicts caused by outdated sequence values after the business switchover, manually synchronize sequences in the data migration task before switching applications, so that the latest sequence values in the source database are updated to the target database.

If the source Oracle database uses GBK encoding, whichPolarDBshould the target use?

We recommend that the targetPolarDB use the UTF8 character set. UTF8 offers the best compatibility and avoids migration failures or data inconsistency caused by encoding defects of the GBK character set itself (such as conflicts with ASCII codes or allowing garbled characters to be inserted).

How does DTS handle tables without primary keys?

For tables without a primary key or unique key, DTS cannot guarantee data consistency by default, and duplicate data may be generated on the target. The recommended solution is to enable the Add a hidden primary key for a table without a primary key/a table without a unique key feature in the DTS task configuration. This feature uses the ROWID of Oracle as the hidden primary key of the target table, ensuring data consistency during migration.

What is the difference between traffic replay and result verification? Which one should I use?

They serve different purposes. We recommend using both.

  • Traffic replay: focuses on performance and compatibility. It answers the question: "Can my SQL run on the new database, and how fast is it?"

  • Result verification: focuses on data accuracy. It answers the question: "Are the results of my SQL the same on the old and new databases?"

We recommend that you first use traffic replay to verify performance and compatibility at scale and fix issues, and then use result verification to finally confirm data consistency for core queries.