百度智能云

All Product Document

          Database Transmission Server

          Oracle as Source

          1 Applicable Scenarios

          This document applies to scenarios where you migrate data in a self-built Oracle instance to a DTS-supported data target using the Baidu AI Cloud Data Transmission Service (DTS).

          2 Restrictions on Using Oracle Database as DTS Source

          • The incremental synchronization feature destination’t support the synchronization of DDL statements in a relational database.
          • If the primary key or unique constraint does not exist for the table to migrate in the source database and all fields are not unique, there may be duplicate data in the target database. Note: When you apply a materialized view log (mlog) scheme in the incremental synchronization, you can’t migrate the data without a primary key table.
          • For the application of the materialized view log (mlog) scheme in increment synchronization, if you need to select the total and incremental migration simultaneously, the materialized view log related to the migration table isn’t allowed at the source end. If you only select the incremental migration, you need to create the materialized view log related to the migration table in advance at the source end.
          • For the application of an archiving log (logminer) scheme in the incremental synchronization, you need to enable an archiving mode and Supplemental Logging as required. For details, see Object Mapping Configuration

          3 Precondition of Oracle Database as DTS Source

          3.1 Environment Requirements

          DTS allows you to use the self-built databases of Oracle 10g, 11g, 12c (PDB connecting mode required), 18c (PDB connecting mode required), and 19c (PDB connecting mode required) versions as the source.

          3.2 Requirements for Privileges of Database Account

          Source end

          Database Structure Migration Total Migration Incremental migration
          Self-built Oracle database DBA privilege DBA privilege DBA privilege

          For the self-built Oracle database, and the creation and authorization method of a database account, see CREATE USER and GRANT Syntax.

          4 Application of Oracle Database as DTS Source

          For the operation process of task creation, task configuration, pre-check, task start, task pause, and task termination during the use of an Oracle database as the source, see Best Practice Documentation. The Task Configuration Parameters section is different from other data sources.

          Linking Setup

          image.png

          As shown above, you can self-build Oracle instances at the source end of DTS. The instructions for configuration parameters at the Oracle source end are as below:

          Access Type: The self-built Oracle instance that supports Public Network, Baidu Cloud Compute (BCC), Baidu Baremetal Compute (BBC), and Dedicated Server (DDC).

          Data Type: Select the Oracle permanently.

          CVM Server Name/IP: Enter the access IP of the Oracle database.

          Port: Enter the service port of the Oracle database.

          Account: Enter the database account of the Oracle database.

          Password: Enter the password corresponding to the Oracle database account.

          Service Name: Enter the Service Name or SID of the Oracle instance.

          Export Type: Designate the character set for the DTS service to read data from Oracle, whose optional values include “Default”, “UTF8”, and “GBK”. When you select the “Default”, DTS may use the character set for the Oracle instance obtained by querying the following statements as the export type.

          select userenv('language') as charset from dual

          After you enter the information above, click the “Test Connectivity” button to verify whether you enter the correct information or not.

          Object Mapping

          Click the “Authorize a Whitelist to Enter Next Step” button to enter the Select Migration Object page.

          • On this page, you can combine Structure Migration, Total Migration, and Incremental Synchronization as required.
          • If you select Incremental Synchronization, you can designate SQL statement types synchronized in the incremental synchronization process, containing INSERT, UPDATE, and DELETE. The migration of DDL statements is not available in this option, as shown in the following figure.
          • As shown above, two optional migration schemes are available in Incremental Synchronization: A materialized view (mlog) and an archiving log scheme (logminer). If you choose the archive log (logminer) scheme, you need to meet the following requirements:

            • You need to enable an archiving mode (ARCHIVELOG) for an Oracle database. For details, see ARCHIVELOG.
            • You need to enable Supplemental Logging and then database-level Minimal Supplemental Logging for the Oracle database; and you need to enable ALL COLUMN LOGGING for the synchronization table. For details, see Supplemental Logging.
          • Manual Choice” is only available in Transmission Objects. Select a database table you want to migrate on the left side of the page so that the database table information may be added to the right side of the page automatically. Then, click the “Edit” button next to the database table name to set up database table name mapping, row filtering, blacklist/whitelist column filtering, and other features, as shown in the following figure.
          • After you finish the configurations, click “Save and Pre-check” to pre-check.

          5 Oracle Source Data Types Supported by DTS

          The following table lists Oracle source data types supported by DTS and default mapping with the DTS data types.

          For any information on how to view the data types mapped at the target, see Data Type Mapping of Target Data Sources.

          Oracle Data Type DTS Field Type Whether DTS supports or not
          number DTS_TYPE_NUMBER Yes
          binary_float DTS_TYPE_NUMBER(precision=65, scale=8) Yes
          binary_double DTS_TYPE_DOUBLE Yes
          float DTS_TYPE_DOUBLE Yes
          char DTS_TYPE_STRING Yes
          varchar2 DTS_TYPE_STRING Yes
          nchar DTS_TYPE_STRING Yes
          nvarchar2 DTS_TYPE_STRING Yes
          clob DTS_TYPE_STRING Yes
          nclob DTS_TYPE_STRING Yes
          blob DTS_TYPE_BYTES Yes
          raw DTS_TYPE_BYTES Yes
          long raw DTS_TYPE_BYTES Yes
          long DTS_TYPE_STRING Yes
          date DTS_TYPE_DATETIME Yes
          timestamp DTS_TYPE_DATETIME Yes
          timestamp with time zone _ No
          timestamp with local time zone _ No
          interval year to month _ No
          interval day to second _ No
          bfile _ No
          xmltype _ No
          rowid _ No
          urowid _ No
          sdo_geometry _ No
          Previous
          Use SQL Server Database as DTS Source
          Next
          MySQL as Source