An Oracle data source allows you to read data from Oracle by using Oracle Reader and write data to Oracle by using Oracle Writer. You can configure synchronization nodes for Oracle by using the codeless user interface (UI) or code editor. This topic describes the network environment and permissions that you must prepare before you configure a data source. It also describes how to add an Oracle data source to DataWorks.

Prerequisites

Before you configure a data source, make sure that the following operations are performed:
  • Prepare the data source: An Oracle data source is created.
  • Plan and prepare resources: An exclusive resource group for data integration is purchased and configured. For more information, see Plan and configure resources.
  • Evaluate and plan the network environment: Before you add the data source to DataWorks, connect the data source to an exclusive resource group for data integration based on your business requirements. After the data source and exclusive resource group for data integration are connected, configure access settings such as a vSwitch and a whitelist.
    • If data sources and exclusive resource groups for data integration reside in the same region and virtual private cloud (VPC), they are automatically connected.
    • If data sources and exclusive resource groups for data integration reside in different network environments, you must connect data sources and resource groups by using methods such as a VPN gateway.
    For more information about how to configure a whitelist, see Configure whitelists for data sources.
  • Prepare an account and authorize the account:

    You must create an account that can be used to access data sources, read data from the source data source, and write data to the destination data source in the data integration process.

    For more information, see Create and authorize an account.
  • Enable the supplemental logging feature.
    You must enable generation of database-level redo log files and enable database-level supplemental logging for the Oracle database to be configured as a source data source.
    • Redo log files: Oracle uses redo log files to ensure that database transactions can be re-executed. This way, data can be recovered in the case of a failure such as power outage.
    • Supplemental logging: Supplemental logging is used to supplement the information recorded in redo log files. In Oracle, a redo log file is used to record the values of the fields that are modified. Supplemental logging is used to supplement the change history in the redo log file. This ensures that the redo log file contains complete information that describes data changes. If operations such as data recovery and data synchronization are performed, you can view complete statements and data updates. Some features of the Oracle database can be better implemented after supplemental logging is enabled. Therefore, you must enable supplemental logging for the database.

      For example, if you do not enable supplemental logging, after you execute the UPDATE statement, the redo log file records only the values of the fields that are modified when the UPDATE statement is executed. If you enable supplemental logging, the redo log file records the values of fields before and after a modification. The conditions that are used to modify destination fields are also recorded. When an exception such as power outage occurs in the database, you can recover data based on the modification details.

      We recommend that you enable supplemental logging for primary key columns or unique index columns.
      • After you enable supplemental logging for primary key columns, the columns that compose a primary key are recorded in logs if the database is updated.
      • After you enable supplemental logging for unique index columns, the columns that compose a unique key or bitmap index are recorded in logs if a column is modified.
    You can configure the supplemental logging feature only in a primary Oracle database. This feature can be enabled for a primary or secondary database. For more information about how to enable the feature, see Enable supplemental logging and switch a redo log file.
  • Check the character encoding formats of the database.

    You must make sure that the Oracle database contains only the character encoding formats that are supported for data integration to prevent a data synchronization failure. The following encoding formats are supported for data synchronization: UTF-8, AL32UTF8, AL16UTF16, and ZHS16GBK.

    For more information, see Check character encoding formats of the database.
  • Check the data types of tables in the database.

    You must make sure that the Oracle database contains only the data types that are supported for data integration to prevent data synchronization failures. The following data types are not supported for real-time data synchronization: LONG, BFILE, LONG RAW, and NCLOB.

    For more information, see Check the data types of tables in the database.

Background information

Workspaces in standard mode support the data source isolation feature. You can add data sources for the development and production environments separately and isolate the data sources to protect your data security. For more information, see Isolate connections between the development and production environments.

Add an Oracle data source

  1. Go to the Data Source page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where your workspace resides. Find your workspace and click Data Integration in the Actions column.
    4. On the page that appears, click Connection in the left-side navigation pane. The Data Source page appears.
  2. On the Data Source page, click New data source in the upper-right corner.
  3. In the Add data source dialog box, click Oracle in the Relational Database section.
  4. In the Add Oracle data source dialog box, configure the parameters.
    Oracle
    Parameter Description
    Data Source Name The name of the data source. The name must contain letters, digits, and underscores (_), and must start with a letter.
    Data source description The description of the data source. The description can be a maximum of 80 characters in length.
    JDBC URL The Java Database Connectivity (JDBC) URL of the database, in the format of jdbc:oracle:thin:@ServerIP:Port:Database.
    User name The username that is used to connect to the database.
    Password The password that is used to connect to the database.
  5. On the Data Integration tab, click Test connectivity in the Operation column of each resource group.
    A sync node uses only one resource group. To ensure that your sync nodes can be properly run, you must test the connectivity of all the resource groups for Data Integration on which your sync nodes will be run. If you need to test the connectivity of multiple resource groups for Data Integration at a time, select the resource groups and click Batch test connectivity. For more information, see Select a network connectivity solution.
  6. After the connection passes the connectivity test, click Complete.

What to do next

You have learned how to configure an Oracle data source. You can proceed to subsequent tutorials. The subsequent tutorials describe how to configure Oracle Reader or Oracle Writer. For more information, see Oracle Reader and Oracle Writer.