DataWorks provides Oracle Reader and Oracle Writer for you to read data from and write data to Oracle data sources. You can use the codeless user interface (UI) or code editor to configure synchronization nodes for Oracle data sources. This topic describes the network environment and permissions that you must prepare before you add a data source. It also describes how to add an Oracle data source in DataWorks.
- 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 you connect the data source to the exclusive
resource group for Data Integration, configure network access settings such as a vSwitch
and a whitelist.
- If the data sources and the exclusive resource group for Data Integration reside in the same region and virtual private cloud (VPC), they are automatically connected.
- If the data sources and the exclusive resource group for Data Integration reside in different network environments, you must connect the data sources and the resource group by using methods such as a VPN gateway.
- Prepare an account and authorize the account:
You must create an account that can be used to access the data sources, read data from the source, and write data to the destination during the data synchronization process.For more information, see Create and authorize an account.
- Enable the supplemental logging feature:
You must enable the generation of database-level archived log files and redo log files and enable database-level supplemental logging for the Oracle database to be configured as a source data source.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.
- Archived log files: Oracle archives all redo log files as archived log files that are used to restore the database in the event of a failure.
- 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.
- 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 by 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 by Data Integration to prevent a data synchronization failure. 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.
Add an Oracle data source
- Go to the Data Source page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- After you select the region where the required workspace resides, find the workspace and click Data Integration in the Actions column.
- In the left-side navigation pane of the Data Integration page, choose to go to the Data Source page.
- On the Data Source page, click Add data source in the upper-right corner.
- In the Add data source dialog box, click Oracle in the Relational Database section.
- In the Add Oracle data source dialog box, configure the parameters.
Parameter Description Data Source Name The name of the data source. The name can 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
User name The username that you use to connect to the database. Password The password that you use to connect to the database.
- Set Resource Group connectivity to Data Integration.
- Find the desired resource group in the resource group list in the lower part of the
dialog box and click Test connectivity in the Actions column. A synchronization node can use only one type of resource group. To ensure that your synchronization nodes can be normally run, you must test the connectivity of all the resource groups for Data Integration on which your synchronization nodes will be run. If you want 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 Establish a network connection between a resource group and a data source.Note
- By default, the resource group list displays only exclusive resource groups for Data Integration. To ensure the stability and performance of data synchronization, we recommend that you use exclusive resource groups for Data Integration.
- If you want to test the network connectivity between the shared resource group or a custom resource group and the data source, click Advanced below the resource group list. In the Warning message, click Confirm. Then, all available shared and custom resource groups appear in the resource group list.
- After the data source passes the connectivity test, click Complete.