Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

From Oracle to PostgreSQL

Updated on 2023-01-05 GMT+08:00

Supported Source and Destination Databases

Table 1 Supported databases

Source DB

Destination DB

  • On-premises Oracle databases
  • Oracle databases on an ECS
  • RDS for PostgreSQL

Suggestions

CAUTION:
  • When a task is being started or in the full migration phase, do not perform DDL operations on the source database. Otherwise, the task may be abnormal.
  • To maintain data consistency before and after the migration, do not write data to the source and destination databases in the full migration mode. In the full+incremental migration mode, you can continue the migration while data is still being written to the source database.
  • The success of migration depends on environment and manual operations. You can run a migration test before you start the full-scale migration to help you detect and resolve problems in advance.
  • Start your migration task during off-peak hours. A less active database is easier to migrate successfully. If the data is fairly static, there is less likely to be any severe performance impacts during the migration.
    • If network bandwidth is not limited, the query rate of the source database increases by about 50 MB/s during full migration, and two to four CPUs are occupied.
    • To ensure data consistency, tables to be migrated without a primary key may be locked for 3s.
    • The data being migrated may be locked by other transactions for a long period of time, resulting in read timeout.
    • If DRS concurrently reads data from a database, it will use about 6 to 10 sessions. The impact of the connections on services must be considered.
    • If you read a table, especially a large table, during the full migration, the exclusive lock on that table may be blocked.
  • Data-level comparison

    To obtain accurate comparison results, compare data at a specified time point during off-peak hours. If it is needed, select Start at a specified time for Comparison Time. Due to slight time difference and continuous operations on data, inconsistent comparison results may be generated, reducing the reliability and validity of the results.

Precautions

Before creating a migration task, read the following notes:
Table 2 Precautions

Type

Restrictions

Database permissions

  • The source database must have the following minimum permissions:

    CREATE SESSION, SELECT ANY TRANSACTION, SELECT ANY TABLE, SELECT ANY DICTIONARY and SELECT ANY SEQUENCE.

  • The destination database must have the following minimum permissions:

    The permissions to create databases and tables in the destination database.

Migration objects

  • Tables, indexes, constraints, sequences, and data can be migrated. Other database objects, such as stored procedures, cannot be migrated.
  • Full synchronization does not support the following column types: bfile, xml, sdo_geometry, urowid, and self-defined types.
  • For the TIMESTAMP WITH TIME ZONE data type, the data cannot be greater than 9999-12-31 23:59:59.999999 after being converted based on the time zone of the destination database.
  • Tables whose default values contain expressions of functions cannot be migrated.
  • The default values of the source database can be to_date and sys_guid functions. To use a function as the default value, ensure that the destination database has the same function. For example, if the source database contains the sys_guid function, the uuid_generate_v1 function is required in the destination PostgreSQL database. If the sys_guid function fails to be migrated, run the following statement in the destination database to install the plug-in and retry the task:
    create extension if not exists "uuid-ossp";
  • Function indexes cannot be migrated.

    Example:

    create index idx_t on t(substr(dt, 1, 8));

Source database

  • PostgreSQL and Oracle database structures are different. The former has a schema. Therefore the statement for creating views cannot contain db.Table. Otherwise, the view migration fails.

    Example: Change the statement 1 to statement 2.

    Statement 1:

    create view v1 as select id from db1.t1;

    Statement 2:

    create view v1 as select id from t1;
  • The maximum precision supported by timestamp and interval day to second is 6.
  • The data type cannot be bfile, xmltype, sdo_geometry, or user-defined.
  • The source database cannot contain tables with same names but different letter cases.
  • The names of databases and tables cannot contain non-ASCII characters or special characters .><\`|,?'!"
  • If the destination database is PostgreSQL Enhanced Edition, the trigger name in the source database must be unique.
  • An empty source database cannot be migrated.
  • Only the following character sets are supported: ZHS16GBK, AL32UTF8, UTF8, US7ASCII, and WE8MSWIN1252.

Destination database

  • The destination instance must be the RDS PostgreSQL Enhanced Edition DB instance.
  • The destination database cannot contain objects whose names are lowercase version of the source database object names.

Precautions

  • Objects that have dependencies must be migrated at the same time to avoid migration failure. Common dependencies: tables referenced by primary or foreign keys
  • You can migrate one database (owner) at a time in a single migration task. To migrate multiple databases, you need to create multiple tasks.
  • After objects such as tables are migrated to the destination database, their names are converted into lowercase letters. For example, the name of object ABC is changed to abc after being migrated to the destination database.
  • The time zone settings of the source and destination database must be the same.
  • If there are special characters in the Oracle database, the code of the destination Oracle database must be the same as the code of the source Oracle database. Otherwise, garbled characters are displayed in the destination database.
  • The table without a primary key lacks a unique identifier for rows. When the network is unstable, you may need to retry the task several times, or data inconsistency may occur.
  • If the data types are incompatible, the migration may fail.
  • During the migration, writing data to the source and destination databases is not allowed. Otherwise, data inconsistency may occur.
  • During the migration, do not modify or delete the usernames, passwords, permissions, or ports of the source and destination databases.
  • During task startup or full migration, you are not advised to perform DDL operations on the source database, such as deleting the database or indexes. Otherwise, the migration may fail.
  • During a full migration, DRS writes large amount of data to the destination PostgreSQL database. As a result, the number of PostgreSQL WAL logs increases sharply, and the PostgreSQL disk space may be used up. You can disable the PostgreSQL log backup function before the full migration to reduce the number of WAL logs. After the migration is complete, enable the function.
    CAUTION:

    Disabling log backup will affect database disaster recovery. Exercise caution when performing this operation.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback