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
On this page

Show all

Generating Test Data

Updated on 2025-02-13 GMT+08:00

Before the synchronization, prepare some data types in the source database for verification after the synchronization is complete.

The following table lists data types supported by DRS.

Table 1 Data type mapping

Source Data Type

Destination Data Type

Sync (Source Data Type as Primary Key)

Sync (Source Data Type as Non-Primary Key)

Comparison (Source Data Type as Primary Key)

Comparison (Source Data Type as Non-Primary Key)

Remarks

CHAR

character

Supported

Supported

Supported. The spaces before and after the character are ignored.

Supported. The spaces before and after the character are ignored.

-

VARCHAR

character varying

Supported

Supported

Supported

Supported

The precision ranges of the source and destination databases are different, causing precision loss.

VARCHAR2

character varying

Supported

Supported

Supported

Supported

-

NCHAR

character

Supported

Supported

Supported. The spaces before and after the character are ignored.

Supported. The spaces before and after the character are ignored.

-

NVARCHAR2

nvarchar2

Supported

Supported

Supported

Supported

-

NUMBER

numeric

Supported

Supported

Supported

Supported

-

NUMBER (6,3)

numeric(6,3)

Supported

Supported

Supported

Supported

-

NUMBER (6,0)

Integer

Supported

Supported

Supported

Supported

-

NUMBER (3)

smallint

Supported

Supported

Supported

Supported

-

NUMBER (6,-2)

integer

Supported

Supported

Supported

Supported

-

BINARY_FLOAT

real

Unsupported (The destination database does not support creating tables using the primary key.)

Supported

Unsupported

Supported

The precision ranges of the source and destination databases are different, causing precision loss.

BINARY_DOUBLE

double precision

Unsupported (The destination database does not support creating tables using the primary key.)

Supported

Unsupported

Supported

-

FLOAT

real

Unsupported (The destination database does not support creating tables using the primary key.)

Supported

Unsupported

Supported

The precision ranges of the source and destination databases are different, causing precision loss.

INT

numeric

Supported

Supported

Supported

Supported

-

INTEGER

numeric

Supported

Supported

Supported

Supported

-

DATE

date

Supported

Supported

Unsupported

Supported

If a table with date type is created in the destination database, the data type precision range in the source database is different from that in the destination database, causing precision loss. Therefore, comparison is not supported.

TIMESTAMP

timestamp(6) without time zone

Supported

Supported

Unsupported

The value is accurate to six decimal places.

The maximum precision supported by the source database is 6.

TIMESTAMP_TZ

timestamp(6) with time zone

Unsupported (The source database does not support creating tables using the primary key.)

Supported

Unsupported

Filter this column.

-

TIMESTAMP_LTZ

timestamp(6) with time zone

Unsupported (The destination database does not support creating tables using the primary key.)

Supported

Unsupported

Filter this column.

-

INTERVAL_YM

interval year to month

Supported

Supported

Unsupported

Unsupported

Incremental synchronization does not support this type.

INTERVAL_DS

interval day to second

Supported

Supported

Unsupported

Unsupported

Incremental synchronization does not support this type. The maximum precision supported by the source database is 6.

BLOB

bytea

Unsupported (The source database does not support creating tables using the primary key.)

Supported

Unsupported

Filter this column.

-

CLOB

text

Unsupported (The source database does not support creating tables using the primary key.)

Supported

Unsupported

Filter this column.

-

NCLOB

text

Unsupported (The source database does not support creating tables using the primary key.)

Supported

Unsupported

Filter this column.

-

LONG

text

Unsupported (The source database does not support creating tables using the primary key.)

Supported

Unsupported

Filter this column.

-

LONG_RAW

bytea

Unsupported (The source database does not support creating tables using the primary key.)

Supported

Unsupported

Filter this column.

-

RAW

bytea

Unsupported (The destination database does not support creating tables using the primary key.)

Supported

Unsupported

Supported

-

RowID

character varying(18)

Supported

Supported

Supported

Supported

-

BFILE

-

Unsupported

Unsupported

Unsupported

Unsupported

Restrictions on the source database: The bfile type is not supported.

XMLTYPE

-

Unsupported

Unsupported

Unsupported

Unsupported

Restrictions on the source database: The xmltype type is not supported.

UROWID

-

Unsupported

Unsupported

Unsupported

Unsupported

Full and incremental synchronizations are not supported.

sdo_geometry

-

Unsupported

Unsupported

Unsupported

Unsupported

Restrictions on the source database: The sdo_geometry type is not supported.

NUMBER(*, 0)

numeric

Supported

Supported

Supported

Supported

-

Perform the following steps to generate data in the source database:

  1. Use a database connection tool to connect to the source Oracle database based on its IP address.
  2. Construct data in the source database based on data types supported by DRS.

    1. Create a test user.

      create user test_info identified by xxx;

      test_info indicates the user created for the test, and xxx indicates the password of the user.

    2. Assign permissions to the user.

      grant dba to test_info;

    3. Create a data table under the user.

      CREATE TABLE test_info.DATATYPELIST(

      ID INT,

      COL_01_CHAR______E CHAR(100),

      COL_02_NCHAR_____E NCHAR(100),

      COL_03_VARCHAR___E VARCHAR(1000),

      COL_04_VARCHAR2__E VARCHAR2(1000),

      COL_05_NVARCHAR2_E NVARCHAR2(1000),

      COL_06_NUMBER____E NUMBER(38,0),

      COL_07_FLOAT_____E FLOAT(126),

      COL_08_BFLOAT____E BINARY_FLOAT,

      COL_09_BDOUBLE___E BINARY_DOUBLE,

      COL_10_DATE______E DATE DEFAULT SYSTIMESTAMP,

      COL_11_TS________E TIMESTAMP(6),

      COL_12_TSTZ______E TIMESTAMP(6) WITH TIME ZONE,

      COL_13_TSLTZ_____E TIMESTAMP(6) WITH LOCAL TIME ZONE,

      COL_14_CLOB______E CLOB DEFAULT EMPTY_CLOB(),

      COL_15_BLOB______E BLOB DEFAULT EMPTY_BLOB(),

      COL_16_NCLOB_____E NCLOB DEFAULT EMPTY_CLOB(),

      COL_17_RAW_______E RAW(1000),

      COL_19_LONGRAW___E LONG RAW,

      COL_24_ROWID_____E ROWID,

      PRIMARY KEY(ID)

      );

    4. Insert two rows of data.

      insert into test_info.DATATYPELIST values(4,'huawei','xian','Shannxi','zhongguo','shijie', 666,12.321,1.123,2.123,sysdate,sysdate,sysdate,sysdate,'hw','cb','df','FF','FF','AAAYEVAAJAAAACrAAA');

      insert into test_info.DATATYPELIST values(2,'Migrate-test','test1','test2','test3','test4', 666,12.321,1.123,2.123,sysdate,sysdate,sysdate,sysdate,'hw','cb','df','FF','FF','AAAYEVAAJAAAACrAAA');

    5. Make the above statements take effect.

      commit;

  3. Create a database at the destination server.

    1. Log in to the management console.
    2. Click in the upper left corner and select a region.
    3. Click in the upper left corner of the page and choose Databases > Data Admin Service.
    4. In the navigation pane on the left, click Development Tool to go to the login list page.
    5. Click Add Login.
    6. On the displayed page, select the DB engine, source database, and target DB instance, enter the login username, password, and description (optional), and enable Collect Metadata Periodically and Show Executed SQL Statements.

      If Collect Metadata Periodically is enabled, select Remember Password.

    1. Click Test Connection to check whether the connection is successful.

      If a message is displayed indicating connection successful, continue with the operation. If a message is displayed indicating connection failed and the failure cause is provided, make modifications according to the error message.

    2. Click OK.
    3. Locate the added instance, click Log In in the Operation column.

    4. Choose SQL Operations > SQL Window on the top menu bar.

    5. Run the following statement to create a database compatible with Oracle:
      test_database_info indicates the database name. Replace it based on the site requirements.
      CREATE DATABASE test_database_info DBCOMPATIBILITY 'ORA';

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