tencent cloud

Tencent Cloud DataBuddy

Oracle Data Source

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-10-09 16:09:35
AI 번역

Overview

Oracle is an enterprise-grade relational database that is widely used in core business systems across industries such as finance, telecommunications, and government. DataBuddy data ingestion supports using Oracle as a source, covering scenarios such as offline synchronization, real-time full-database synchronization, and sharded database and table synchronization. This document describes the connection configuration, supported capabilities, prerequisites, and common issues of Oracle data sources in DataBuddy.

Supported Versions

Type
Supported Version
Oracle
11g / 12c / 19c
JDBC Driver
ojdbc6
New features of Oracle 19c are not supported.

Read Capability

Capability
Offline read
Real-time full database read
Sharded database and table read
Supported
✓
✓
✓
For a complete comparison of data source capabilities, see Supported Data Sources and Read Capabilities.

Use Limits

Real-Time Sync Limitations (Based on LogMiner)

Limit
Description
Log Retention Period
Incremental logs are retained for at least 72 hours.
Standby Database Support
Only logical standby is supported, and physical standby is not supported.
Table without primary key
Tables without primary keys cannot guarantee exactly-once semantics.
Account restrictions
Do not use the system or sys account to configure data sources.
DDL risk
Adding a column with a default value may cause parsing exceptions; LogMiner may cause DML and DDL order disorder.
Performance bottleneck
When LogMiner reads at a rate exceeding 5k/s, significant latency may occur.
Risk in RAC mode
Log file switching may cause LogMiner to fail to detect changes, resulting in data loss.
If the preceding limitations are unacceptable, consider using the OGG (Oracle GoldenGate) solution.

Offline Sync Limitations

Limit
Description
View
Supports view reading
Encoding format.
Only UTF8 / AL32UTF8 / AL16UTF16 / ZHS16GBK are supported.

Supported Field Types

For complete field types, see the Oracle official documentation.
Field Type
Offline read
Real-time read
NUMBER / INTEGER / INT / SMALLINT / NUMERIC / DECIMAL
✅
✅
FLOAT / BINARY_FLOAT / DOUBLE PRECISION / BINARY_DOUBLE / REAL
✅
✅
CHAR / VARCHAR / VARCHAR2 / NCHAR / NVARCHAR2
✅
✅
CLOB / NCLOB
✅
✅
DATE / TIMESTAMP / TIMESTAMP WITH TIME ZONE / TIMESTAMP WITH LOCAL TIME ZONE
✅
✅
BLOB / RAW / LONG RAW
✅
✅
ROWID
❌
✅
INTERVAL YEAR TO MONTH / INTERVAL DAY TO SECOND
❌
✅
XMLTYPE / BFILE
❌
❌
The NUMBER type is automatically mapped to TINYINT / SMALLINT / INT / BIGINT or DECIMAL based on its precision. If the precision is not specified, it is mapped to DECIMAL(38, 18) by default.

Supported DML/DDL for Real-Time Sync

DML

Operation
Whether Supported
INSERT / DELETE / UPDATE
✅

DDL

Operation
Whether Supported
Add table / Add column / Delete column / Rename column / Modify column type
✅
Delete table / Clear table / Rename table (RENAME TABLE)
❌
DDL change response takes effect only during the incremental phase. Adding a column with a default value may cause parsing exceptions, and LogMiner may cause DML and DDL operations to be out of order.

Prerequisites

1. Configuring Account Permissions

Offline synchronization:
CREATE USER wedata_user IDENTIFIED BY your_password;
GRANT CREATE SESSION TO wedata_user;
GRANT SELECT ANY TABLE TO wedata_user;
Real-time synchronization:
CREATE USER wedata_cdc_user IDENTIFIED BY your_password DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS;
GRANT CREATE SESSION, SELECT ANY TABLE, SELECT_CATALOG_ROLE TO wedata_cdc_user;
GRANT ANALYZE ANY TO wedata_cdc_user;
GRANT EXECUTE_CATALOG_ROLE TO wedata_cdc_user;
GRANT LOGMINING TO wedata_cdc_user; -- Required for 12c and later versions, not required for 11g.
GRANT EXECUTE ON DBMS_LOGMNR TO wedata_cdc_user;
GRANT EXECUTE ON DBMS_LOGMNR_D TO wedata_cdc_user;

-- System view query permission
GRANT SELECT ON V_$DATABASE TO wedata_cdc_user;
GRANT SELECT ON V_$LOG TO wedata_cdc_user;
GRANT SELECT ON V_$LOG_HISTORY TO wedata_cdc_user;
GRANT SELECT ON V_$LOGMNR_CONTENTS TO wedata_cdc_user;
GRANT SELECT ON V_$LOGMNR_LOGS TO wedata_cdc_user;
GRANT SELECT ON V_$ARCHIVED_LOG TO wedata_cdc_user;
GRANT SELECT ON V_$ARCHIVE_DEST_STATUS TO wedata_cdc_user;
Note:
When table field changes are monitored, do not use the system or sys account to configure data sources.

2. Enabling Log Archiving (Real-Time Sync Only)

A database restart is required, and disk space will be consumed.
sqlplus / as sysdba
ALTER SYSTEM SET db_recovery_file_dest_size = 10G;
ALTER SYSTEM SET db_recovery_file_dest = '/opt/oracle/oradata/recovery_area' scope=spfile;
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
ARCHIVE LOG LIST; -- Verify the archiving mode.

3. Enabling Supplemental Logging (Real-Time Sync Only)

If it is not enabled, other columns downstream of the UPDATE operation will be empty.
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER TABLE schema_name.table_name ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;

Creating a Data Source

Operation Steps

1. Log in to the DataBuddy console.
2. Switch to the target region and Workspace at the top.
3. Go to Data Integration > Task Management > Data Source Management (or Platform Management > Data Source Management).
4. Click Add Data Source and select Oracle.
5. Enter the connection configuration and authentication information. For details, see Parameter Description.
6. Click Test Connection (see Data Source Connectivity Test).
7. After the test passes, click Save or Save & Create Task.

Parameter Description

Parameter
Description
Required
Data Source Name
Unique identifier of the data source within the workspace
Yes
JDBC URL
jdbc:oracle:thin:@host:port:sid or jdbc:oracle:thin:@//host:port/service_name
Yes
Username.
Database connection account (system / sys not allowed)
Yes
Password
Database connection password (SSM credential hosting supported)
Yes
Data Source Version
11g / 12c / 19c
Yes
Example JDBC URL:
jdbc:oracle:thin:@10.0.0.1:1521:ORCL
jdbc:oracle:thin:@//10.0.0.1:1521/ORCLPDB

Using in Data Ingestion Tasks

Real-Time Full Database Sync

Configuration Item
Description
Source Table Scope
Specified tables (only selected tables are synchronized; new tables require a restart) / regex matching (specify database name + table name regex; new tables that match the rule are automatically added)
Read Mode
Full + incremental / Incremental only

Offline Single Table Sync

Parameter
Description
Database / Schema / Table
Required; supports specification and regex matching.
Split Key
Primary key or index columns recommended; used for parallel synchronization.
Filtering Condition
Standard WHERE syntax

Best Practices

Account Permission Minimization: Use a dedicated account and avoid system / sys.
Log Retention Time: Archived logs must be retained for at least 72 hours.
Split Key Selection: Primary key or index column.
Performance Considerations: When LogMiner exceeds 5k/s, it is recommended to use the OGG solution instead.

FAQs

Q: High Latency in Real-Time Sync?

A: LogMiner has performance bottlenecks when the read rate exceeds 5k/s. You can optimize job parallelism and reduce the number of synchronized tables. For high-throughput scenarios, OGG is recommended.

Q: Task Exception After a Column with a Default Value Is Added?

A: LogMiner has issues parsing added columns with default values. It is recommended to add the column first and then UPDATE the default value.

Q: Some Data Not Synced in a RAC Environment?

A: Log file switching may cause LogMiner to fail to detect changes. Increase the log retention time and optimize the archived log configuration.

Q: Other Columns Empty on the Destination After an UPDATE?

A: Supplemental logging is not enabled. Perform the following:
ALTER TABLE schema_name.table_name ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;

Q: Connection Timeout or Refused?

A: Check network connectivity, listener status, and firewall ports.

References

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백