Skip to main content
Ctrl+K

Framework Repositories 1.0 documentation

  • AI
    • Baidu
      • PaddlePaddle Docker
      • PaddleOCR Docker
      • PaddleDetection Docker
      • Paddle Lite Docker
      • FastDeploy
      • VisualDL Docker
      • PaddleX
      • Baidu Comate
    • PyTorch Docker
    • TensorFlow Docker
    • Jupyter Docker
    • MLflow Docker
    • YOLO Python
    • Label Tools
    • Label Studio Docker
    • Make Sense Docker
    • Face Recognition Docker
    • InsightFace
    • ChatGPT Next Web Docker
    • IOPaint Docker
    • Ollama Docker
    • vLLM Docker
    • Open WebUI Docker
    • Chatbot Ollama Docker
    • MaxKB Docker
    • AnythingLLM Docker
    • Big-AGI Docker
    • LocalAI Docker
    • GPT4All
    • FastGPT Docker
    • One API Docker
    • Dify Docker
    • LangChain
    • Langflow Docker
    • n8n Docker
    • Flowise Docker
    • OpenClaw Docker
    • Stable Diffusion
    • ComfyUI
    • Comflowy Note
    • InvokeAI Docker
    • SearXNG Docker
    • AI Clients
    • MCP Inspector Docker
    • MCP Servers
    • Pollinations
    • Prompt Optimizer Docker
    • PDFMathTranslate Docker
    • TrWebOCR Docker
    • Neo4j Docker
    • GPT-Load Docker
    • LangBot Docker
    • HivisionIDPhotos Docker
  • Big Data
    • Apache
      • Zeppelin Docker
      • Flink Docker
      • DolphinScheduler Docker
    • Cloudera
      • Cloudera Manager Docker
    • Flume
      • Flume Introduction
      • Flume Environment
      • Flume Configuration
      • Flume Sequence Generator Source
      • Flume NetCat Source
      • Flume Fetching Twitter Data
    • Hadoop
      • Enviornment Setup
      • HDFS
      • Command Reference
      • MapReduce
      • Streaming
      • Multi-Node Cluster
      • YARN
      • Azkaban Docker
    • HBase
      • HBase Overview
      • HBase Architecture
      • HBase Installation
      • HBase Shell
      • HBase Admin API
      • HBase Table
      • HBase Client API
      • HBase Data
    • Hive
      • Hive Introduction
      • Hive Installation
      • Hive Data Types
      • Hive Database
      • Hive Table
      • Hive Partitioning
      • Hive Built-in Operators
      • Hive Built-in Functions
      • Hive View and Indexes
      • HiveQL
      • Hive vs. HBase
    • Impala
      • Impala Overview
      • Impala Environment
    • Pig
      • Pig Overview
      • Pig Architecture
      • Pig Installation
      • Pig Execution
      • Pig Grunt Shell
      • Pig Latin Basics
      • Pig Load & Store Operators
      • Pig Diagnostic Operators
      • Pig Group Operator
      • Pig Cogroup Operator
      • Pig Join Operator
      • Pig Cross Operator
      • Combining & Splitting
      • Filtering
      • Sorting
      • Pig Eval Functions
      • Pig Load & Store Functions
      • Pig Bag & Tuple Functions
      • Pig String Functions
      • Pig Date-time Functions
      • Pig Math Functions
      • Pig User Defined Functions
      • Pig Running Scripts
    • Kafka
      • Kafka Quickstart
      • Kafka Manager
    • Solr
      • Solr笔记
      • Solr网摘笔记
    • Spark
      • Spark Introduction
      • Spark RDD
      • Spark Installation
      • Spark SQL Introduction
      • Spark SQL DataFrames
      • Spark SQL Data Sources
    • Storm
      • Storm笔记
      • Storm官方文档
      • Storm网摘笔记
  • Databases
    • Cassandra
      • Cassandra Docker
      • Cassandra Nodetool
      • Cassandra-web Docker
      • Cassandra Cqlsh
    • Couchbase
      • Couchbase Docker
    • Derby Quick Start
    • Exchange
      • Debezium Docker
      • Canal Docker
      • StreamSets Data Collector Docker
      • CloudBeaver Docker
      • Slashbase
      • GreptimeDB Docker
      • Doris Docker
      • Flink CDC Doris
      • Flink CDC Oracle Doris
      • ClickHouse Docker
      • Trino Docker
      • Presto Docker
      • QuestDB Docker
      • DataX Docker
      • Chat2DB Docker
      • RethinkDB Docker
      • Camel Karavan Docker
      • Hawtio Docker
      • Kaoto Docker
      • TDengine Docker
      • DrawDB Docker
    • InfluxDB
      • InfluxDB Docker
    • Kettle
      • Kettle网摘笔记
      • webSpoon Docker
    • Memcached
      • Memcached Docker
    • MongoDB
      • MongoDB Docker
    • MySQL
      • Installation Using Binaries
      • Installation Using Yum
      • Using Option Files
      • mysqld
      • mysqld_safe
      • mysql.server
      • mysqld_multi
      • mysql_secure_installation
      • mysqldump
      • mysqlslap
      • ALTER USER Statement
      • CREATE USER Statement
      • DROP USER Statement
      • GRANT Statement
      • RENAME USER Statement
      • REVOKE Statement
      • SET PASSWORD Statement
      • InnoDB Backup and Recovery
      • MySQL Sample Database
      • MySQL Index
      • MySQL Functions
      • MySQL Date Functions
      • MySQL String Functions
      • MySQL Math Functions
      • MySQL Window Functions
      • MySQL my.cnf
      • MySQL Docker
      • phpMyAdmin Docker
      • Adminer Docker
      • Yearning Docker
      • Locks
    • Oracle
      • Oracle Docker
      • Oracle笔记 Chapter 1-2
      • Oracle笔记 Chapter 3.1-3.3
      • Oracle笔记 Chapter 3.4
      • Oracle笔记 Chapter 3.5-3.7
      • Oracle笔记 Chapter 5
      • Oracle Version Numbers
      • Oracle ORAPWD
      • Oracle Startup and Shutdown
      • Oracle TO_DATE TO_CHAR
      • Oracle Tips
    • PostgreSQL
      • PostgreSQL Tutorial
      • PostgreSQL SQL
      • PostgreSQL Master-Slave
      • pgAdmin Docker
      • TimescaleDB Docker
    • Redis
      • Redis笔记
      • Redis开发与运维笔记 Chapter 3
      • Redis开发与运维笔记 Chapter 4
      • Redis开发与运维笔记 Chapter 11
      • Redis网摘笔记
      • RedisInsight
      • Redis Docker
      • RediSearch Docker
      • Hystrix网摘笔记
      • DbGate Docker
    • SQLite
      • SQLite Docker
      • SQLite Browser Docker
    • Vector
      • Chroma Docker
      • Weaviate Docker
  • DevOps
    • Jenkins Docker
    • Jenkins LTS Docker
    • Jenkins Pipeline
    • Nexus Docker
    • Gitea Docker
    • GitLab Docker
    • Zentao Docker
    • Nacos Docker
    • Consul Docker
    • Grafana
    • Grafana Docker
    • Grafana Loki Docker
    • Prometheus Docker
    • Zipkin Docker
    • Jaeger Docker
    • Skywalking Docker
    • SonarQube Docker
    • XXL-JOB Docker
    • PowerJob Docker
    • Flowable Docker
    • Camunda Docker
    • ShowDoc Docker
    • Redmine Docker
    • Drawio Docker
    • tldraw
    • draw-a-ui
    • CAT Docker
    • Zabbix Docker
    • Zabbix JVM Docker
    • HertzBeat Docker
    • Jpom Docker
    • Graylog Docker
    • Tomcat Docker
    • Jetty Docker
    • WildFly Docker
    • Gate One Docker
    • Jira Docker
    • AdguardHome Docker
    • Pi-hole Docker
    • Cloudflare Docker
    • Heimdall Docker
    • dash. Docker
    • WireGuard Docker
    • Vaultwarden Docker
    • Unbound Docker
    • Sonic Docker
    • Teleport Docker
    • JumpServer Docker
    • 1Panel Docker
    • Halo Docker
    • MeterSphere
    • CloudExplorer Lite
    • Kasm Docker
    • Ubuntu VNC Docker
    • Wireshark Docker
    • Baota Docker
    • iRedMail Docker
    • Uptime Kuma Docker
    • Gatus Docker
    • Umami Docker
    • SafeLine Docker
    • Domain Admin Docker
    • Homebox Docker
    • IT Tools Docker
    • Matomo Docker
    • Homarr Docker
    • Speed Test Docker
    • Puter Docker
    • RSSHub Docker
    • Password Pusher Docker
    • Message Pusher Docker
    • Message Nest Docker
    • Gotify Docker
    • Dashy Docker
    • Planka Docker
    • Flow Docker
    • OCRmyPDF Docker
    • Stirling PDF Docker
    • Healthchecks Docker
  • Docker
    • ELK
      • Elasticsearch Docker
      • Logstash Docker
      • Kibana Docker
      • Docker ELK
      • Docker Compose ELK
    • Docker Installation
    • Docker Compose Installation
    • Docker Note
    • Docker Containers Evolution
    • Docker Quickstart
    • Docker One Hour
    • Docker Desktop for Windows
    • Docker Networks
    • Docker Dockerfile
    • Docker Hub
    • Docker CLI
    • Prune unused Docker objects
    • Docker Swarm
    • Docker in Docker
    • Docker Registry
    • Docker Utilities
    • Ouroboros Docker
    • Watchtower Docker
    • Diun Docker
    • Dockly Docker
    • Dozzle Docker
    • Portainer Docker
    • UI For Docker
    • Shipyard Docker
    • Dockge Docker
    • Node.js Docker
    • Rancher Docker
    • Arthas Docker
    • OpenJDK Docker
    • Theia Docker
    • Flutter Docker
    • SurveyKing Docker
    • Tabler Docker
    • OpenSearch Docker
    • Moodist Docker
    • Browserless Docker
    • Airsonic-Advanced Docker
    • Ardour Docker
    • GIMP Docker
    • Baby Buddy Docker
    • Pylon Docker
    • LazyLibrarian Docker
    • Kimai Docker
    • JetBrains License Server Docker
    • PairDrop Docker
    • wger Docker
    • Presentation Docker
    • Kubernetes
      • minikube start
      • KubePi Docker
  • Framework
    • 3D
      • Blender Docker
    • API
      • RAP2-DELOS Docker
      • YApi Docker
      • Yaade Docker
      • Kong Docker
      • Kong Dashboard Docker
      • Konga Docker
      • JANUSEC Docker
      • Apache ShenYu Docker
      • MediaWiki Docker
      • Sphinx Note
      • Sphinx Docker
      • Hexo Docker
      • Jekyll Docker
      • Docsify Docker
      • GitBook Docker
      • BookStack Docker
      • CodiMD Docker
      • HedgeDoc Docker
      • MkDocs Docker
      • StackEdit Docker
      • Cherry Markdown
      • Etherpad Docker
      • AFFiNE Docker
      • Dokuwiki Docker
      • Hugo Docker
      • Docsy Docker
      • Wiki.js Docker
      • JSON Hero Docker
      • Discuz! Q Docker
      • kkFileView Docker
      • Huntly Docker
      • Trilium Docker
      • flatnotes Docker
      • JSON Crack Docker
      • Doocs Md Docker
    • Architect
      • 系统架构设计笔记 Part 1
      • 系统架构设计笔记 Part 2
      • 系统架构设计笔记 Part 3
      • 系统架构设计笔记 Part 4
      • 分布式服务架构笔记
      • 大型网站技术架构笔记
      • 大型网站系统与Java中间件实践
    • AVS
      • EasyDarwin Docker
      • SRS Docker
      • SRS Cloud Docker
      • FFmpeg Docker
      • ZLMediaKit Docker
      • WVP-PRO Docker
      • Red5 Docker
      • OpenMeetings Docker
      • LIVE555 Docker
      • MistServer Docker
      • Frigate Docker
      • iSpy Docker
      • Kerberos Docker
      • CumulusClips Docker
      • Janus Docker
    • BI
      • Superset Docker
      • Metabase Docker
      • Hue Docker
      • DataEase Docker
      • Apache Kylin Docker
    • C4 model Note
    • Cloud Native
      • Polaris Mesh Docker
      • Sentinel Docker
      • Pulsar Docker
    • CMS
      • WordPress Docker
      • Plone Docker
      • Joomla Docker
      • OpenCms Docker
      • MCMS Docker
      • Drupal Docker
      • Wagtail Docker
      • Memos Docker
      • Moodle Docker
      • Cockpit Docker
      • Directus Docker
    • Comments
      • Remark42 Docker
      • Cusdis Docker
      • Isso Docker
    • CRM
      • Monica Docker
    • ERP
      • Odoo Docker
      • Axelor Docker
    • IoT
      • ThingsBoard Docker
      • ThingsBoard Gateway Docker
      • ThingsBoard Gateway installation from sources
      • ThingsBoard Website Docker
      • ThingsBoard Doc Docker
      • Kura Docker
      • Node-RED Docker
      • Home Assistant Docker
      • Mosquitto Docker
      • Modbus TCP Server Docker
      • IoTDB Docker
      • EMQX Docker
    • Netdisc
      • Nextcloud Docker
      • Seafile Docker
      • FileRun Docker
      • ownCloud Docker
      • ONLYOFFICE Docker
      • Pydio Cells Docker
      • Collabora Docker
      • DzzOffice Docker
      • ResourceSpace Docker
      • LibreOffice Docker
      • ZFile Docker
      • Cloudreve Docker
      • File Browser Docker
      • FileGator Docker
      • Spacedrive Docker
      • WPS Office Docker
      • ProjectSend Docker
    • PM
      • Pomodoro Technique
    • Soft Skills
    • SSO
      • CAS Docker
      • CAS Note
      • Keycloak Docker
    • Table
      • APITable Docker
      • Baserow Docker
      • NocoBase Docker
      • NocoDB Docker
      • Teable Docker
      • Undb Docker
    • Tests
      • JMeter Getting Started
  • Linux
    • Linux Note
      • Linux笔记 Chapter 1
      • Linux笔记 Chapter 2
      • Linux笔记 Chapter 3
      • Linux笔记 Chapter 4
      • Linux笔记 Chapter 5
      • Linux笔记 Chapter 6
      • Linux笔记 Chapter 7
      • Linux笔记 Chapter 8
    • Linux常用命令大全
    • Linux Clear Cache
    • Linux Cron Scheduling Task
    • Linux env
    • Linux ps command
    • Linux Boot
    • CentOS Chrony
    • CentOS Installation
    • CentOS Mail
    • CentOS Python
    • CentOS Tips
    • CentOS Tomcat
    • CentOS Docker
    • Ubuntu Docker
    • BusyBox Docker
    • Alpine Docker
    • Endlessh Docker
  • MQ
    • ActiveMQ笔记
    • ActiveMQ网摘笔记
    • ActiveMQ Cluster
    • ActiveMQ Exclusive Consumer
    • ActiveMQ Docker
    • Kafka Zookeeper Docker
    • Kafka Docker
    • Kafka Tool Docker
    • HiveMQ Docker
    • RabbitMQ Docker
  • Network
    • Netty笔记
    • Netty网摘笔记
    • Socket网络编程笔记
    • Socket网络编程网摘笔记
    • TCP Handshake
    • 从tcpdump抓包看TCP/IP协议
    • Network Collection
    • HTTP
      • Posting with HttpClient
      • HttpClient Timeout
      • Custom HTTP Header with the HttpClient
      • HttpClient Connection Management
      • HttpClient with SSL
      • HttpClient Basic Authentication
      • HttpAsyncClient Tutorial
  • Open Source
    • Books
      • 微服务架构设计模式
      • IoT变现
      • 云原生数据中台
    • Online Tools
    • Open Source Licenses
    • GitHub Security
    • GitHub GitLab
    • GitLab Pages
    • GitLab Pages Gitbook
    • Minecraft Docker
  • Proxy
    • nginx笔记
    • nginx img
    • nginx Util
    • nginx网摘笔记
    • nginx网摘笔记
    • nginx Docker
    • Nginx Proxy Manager Docker
    • nginx Location
    • nginx Statistics
    • nginx Logs
    • nginx Init Script
    • nginx Videos
    • nginx Lua
      • nginx Lua Installation
      • nginx Lua Quick Start
      • nginx Lua Redis/SSDB+Twemproxy
      • nginx Lua Dev Lib
      • nginx Lua Web HTTP service
      • nginx Lua Web Desc Page
      • nginx Lua Web Test
      • nginx Lua Flash Sale
    • FastDFS
      • FastDFS笔记
      • FastDFS单节点安装手册
      • FastDFS集群安装手册
      • 使用Spring Boot集成FastDFS
    • MinIO
      • MinIO Docker
      • MinIO Client Docker
      • MinIO Console Docker
      • MinIO Docker Swarm
      • Rclone Docker
    • HAProxy
      • HAProxy Docker
    • Traefik
      • Traefik Docker
    • PVR
      • Bazarr Docker
      • Emby Docker
      • Jackett Docker
      • Jellyfin Docker
      • Medusa Docker
      • Ombi Docker
      • Overseerr Docker
      • Plex Media Server Docker
      • Qbittorrent Docker
      • Radarr Docker
      • Readarr Docker
      • Sonarr Docker
    • Caddy Docker
    • Traffic Server Docker
    • frp Docker
    • FreeRADIUS Docker
    • Neutrino-Proxy Docker
    • Fabio Docker
    • FlareSolverr Docker
    • ZNC Docker
  • Python
    • Python Docker
    • Python Library
    • FastAPI Docker
    • Miniconda Docker
    • Portia Docker
    • Mealie Docker
    • Searx Docker
  • REST
    • Jersey Tomcat
    • Jersey Custom Logging
    • Jersey Set Cookie
    • Jersey File Download
    • Jersey File Upload
    • Jersey Multi-File Upload
    • Jersey Exception Handling
    • Jersey Gson
    • Jersey Security
    • Jersey Client API
    • Jersey Client Authentication
    • Jersey Swagger
  • RPC
    • Dubbo笔记
    • Dubbo Dependencies
    • Dubbo Maturity
    • Dubbo Protocol
    • Dubbo Zookeeper
    • Dubbo Design
    • Dubbo Implementation
    • Dubbo Impls Protocol
    • Dubbo Impls Filter
    • Dubbo Impls Registry
    • Dubbo Impls Config Center
    • Dubbo SPI
    • Dubbo Adaptive Extension
    • Dubbo Export Service
    • Dubbo Refer Service
    • Dubbo Directory
    • Dubbo Router
    • Dubbo Cluster
    • Dubbo LoadBalance
    • Dubbo Service Invoking Process
    • Dubbo Docker
    • Dubbox笔记
  • Spring
    • AOP
      • Spring AOP
      • cglib
    • Transaction
      • Distributed Transaction Deploy
      • 分布式事务解决方案笔记 Segment1
      • 分布式事务解决方案笔记 Segment2
      • 分布式事务解决方案笔记 Segment3
      • 分布式事务解决方案笔记 Segment4
      • 分布式事务解决方案笔记 Segment5
      • 分布式事务解决方案笔记 Segment6
      • 分布式事务解决方案笔记 Segment7
      • TCC Transaction Deploy
      • TCC Transaction Note
      • TCC Transaction Boot Deploy
    • Spring Security
      • Secure Spring REST API using Basic Authentication
      • Spring Security Architecture Overview
      • Spring Security Reference
      • Spring Security Configuration
      • Spring Security Filter
      • Spring Security SpringSecurityFilterChain
      • Spring Security OAuth
      • Spring Security SSO
    • Spring JMS
      • Spring Boot JMSTemplate
      • Spring Boot JMS Topic
    • Spring REST
      • Spring Swagger
    • Spring Session
      • Spring Session
      • Spring Session REST
  • Spring Boot
    • Spring Boot 1.x
      • Building RESTful Web Services
      • Exception Handling
      • Thymeleaf
      • CORS Support
      • Actuator
      • Enabling Swagger2
      • Hystrix
      • Kafka
      • Unit Test
      • Get all loaded beans
    • Spring Boot 2.x
      • Spring Boot 2 Logging
      • Spring Boot 2 REST API
      • Spring Boot 2 ResponseBodyEmitter
      • Spring Boot 2 Async
      • Spring Boot 2 Caching
      • Spring Retry
      • Spring Boot 2 Devtools
      • Spring Boot 2 JUnit
      • Spring Boot 2 H2
      • Spring Boot 2 Cache
      • Spring Boot 2 Gson
      • Spring Boot 2 AOP
      • Spring Boot 2 Security
      • Spring Boot 2 OAuth2
      • Spring Boot 2 Mail
      • Spring Boot 2 RestTemplate
      • Spring Boot 2 ShutdownHook
      • Spring Boot 2 JWT
      • Keycloak Guide
      • Keycloak Documentation
      • Keycloak Security
      • Keycloak OAuth2 PKCE
      • Keycloak MySQL Setup
    • Spring Cloud
      • Spring Cloud Alibaba
        • Spring Cloud Alibaba Sentinel
        • Spring Cloud Alibaba Nacos
        • Spring Cloud Alibaba RocketMQ
        • Spring Cloud Alibaba Dubbo
    • Spring Bean Life Cycle
    • Monitoring and management over JMX
    • Spring Boot Servlet
    • It is time - Goodbye Spring Boot 1.x!
    • Mini Program
      • API Backend
  • ZooKeeper
    • ZooKeeper笔记
    • ZooKeeper网摘笔记
    • ZooKeeper网摘笔记
    • ZooKeeper异常笔记
    • ZooKeeper Logs
    • ZooKeeper Commands
    • ZooKeeper Observers
    • ZooKeeper Management
    • ZooKeeper Docker
    • ZooKeeper Web UI Docker
    • ZooNavigator Docker
  • Show source
  • Suggest edit
  • Open issue
  • .md

Flink CDC Oracle Doris

Contents

  • Oracle 安装并配置
  • 配置数据库恢复和归档日志
  • 创建表空间和用户
  • 创建示例表
  • Doris-Flink-Connector 同步
  • Runtime Environment
  • References

Flink CDC Oracle Doris#

Oracle 同步数据至 Doris

Oracle 安装并配置#

helowin/oracle_11g

配置数据库恢复和归档日志#

登录 SQL*Plus 并执行以下命令:

su - oracle
sqlplus /nolog
-- 以 DBA 身份登录
CONN /AS SYSDBA

-- 设置数据库恢复
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 10G;
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/home/oracle/app/oracle/product/11.2.0' SCOPE=SPFILE;
-- 启用归档日志模式
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;

-- 查看归档日志状态
ARCHIVE LOG LIST;

-- 为整个数据库启用增强日志记录
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

-- 创建用户并赋予 dba 角色
CREATE USER admin IDENTIFIED BY admin123;
-- 为该用户赋予 dba 角色
GRANT DBA TO admin;

创建表空间和用户#

创建表空间:

CREATE TABLESPACE logminer_tbs
DATAFILE '/home/oracle/app/oracle/product/11.2.0/logminer_tbs.dbf'
SIZE 25M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

创建测试用户并授权:

CREATE USER flinkuser IDENTIFIED BY flinkpw DEFAULT TABLESPACE LOGMINER_TBS QUOTA UNLIMITED ON LOGMINER_TBS;

-- 授予必要权限
GRANT CREATE SESSION, CREATE TABLE, LOCK ANY TABLE, ALTER ANY TABLE, CREATE SEQUENCE TO flinkuser;
GRANT SELECT ON V_$DATABASE TO flinkuser;
GRANT FLASHBACK ANY TABLE TO flinkuser;
GRANT SELECT ANY TABLE TO flinkuser;
GRANT SELECT_CATALOG_ROLE, EXECUTE_CATALOG_ROLE TO flinkuser;
GRANT SELECT ANY TRANSACTION TO flinkuser;
GRANT EXECUTE ON DBMS_LOGMNR TO flinkuser;
GRANT EXECUTE ON DBMS_LOGMNR_D TO flinkuser;
GRANT SELECT ON V_$LOG TO flinkuser;
GRANT SELECT ON V_$LOG_HISTORY TO flinkuser;
GRANT SELECT ON V_$LOGMNR_LOGS TO flinkuser;
GRANT SELECT ON V_$LOGMNR_CONTENTS TO flinkuser;
GRANT SELECT ON V_$LOGMNR_PARAMETERS TO flinkuser;
GRANT SELECT ON V_$LOGFILE TO flinkuser;
GRANT SELECT ON V_$ARCHIVED_LOG TO flinkuser;
GRANT SELECT ON V_$ARCHIVE_DEST_STATUS TO flinkuser;

-- 为特定表启用增强日志记录
ALTER TABLE FLINKUSER.CUSTOMERS ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;

创建示例表#

切换到 flinkuser 并创建表:

sqlplus flinkuser/flinkpw

-- 创建 customers 表
CREATE TABLE customers (
    customer_id NUMBER PRIMARY KEY,
    customer_name VARCHAR2(50),
    email VARCHAR2(100),
    phone VARCHAR2(20)
) TABLESPACE LOGMINER_TBS;

-- 创建 product 表
CREATE TABLE product (
    product_id NUMBER PRIMARY KEY,
    product_name VARCHAR2(50),
    price NUMBER
) TABLESPACE LOGMINER_TBS;

-- 查看表空间中的表
SELECT tablespace_name, table_name FROM user_tables WHERE tablespace_name = 'LOGMINER_TBS';

-- 插入 10 条模拟数据
INSERT ALL
  INTO customers (customer_id, customer_name, email, phone) VALUES (1, 'John Doe', 'john.doe@example.com', '123-456-7890')
  INTO customers (customer_id, customer_name, email, phone) VALUES (2, 'Jane Smith', 'jane.smith@example.com', '234-567-8901')
  INTO customers (customer_id, customer_name, email, phone) VALUES (3, 'Bob Johnson', 'bob.johnson@example.com', '345-678-9012')
  INTO customers (customer_id, customer_name, email, phone) VALUES (4, 'Alice Brown', 'alice.brown@example.com', '456-789-0123')
  INTO customers (customer_id, customer_name, email, phone) VALUES (5, 'Charlie Davis', 'charlie.davis@example.com', '567-890-1234')
  INTO customers (customer_id, customer_name, email, phone) VALUES (6, 'Eva Wilson', 'eva.wilson@example.com', '678-901-2345')
  INTO customers (customer_id, customer_name, email, phone) VALUES (7, 'Frank Miller', 'frank.miller@example.com', '789-012-3456')
  INTO customers (customer_id, customer_name, email, phone) VALUES (8, 'Grace Lee', 'grace.lee@example.com', '890-123-4567')
  INTO customers (customer_id, customer_name, email, phone) VALUES (9, 'Henry Taylor', 'henry.taylor@example.com', '901-234-5678')
  INTO customers (customer_id, customer_name, email, phone) VALUES (10, 'Ivy Chen', 'ivy.chen@example.com', '012-345-6789')
SELECT * FROM dual;

-- 验证插入的数据
SELECT * FROM customers;

-- 插入 5 条模拟数据
INSERT ALL
  INTO product (product_id, product_name, price) VALUES (1, 'Product A', 10)
  INTO product (product_id, product_name, price) VALUES (2, 'Product B', 20)
  INTO product (product_id, product_name, price) VALUES (3, 'Product C', 30)
  INTO product (product_id, product_name, price) VALUES (4, 'Product D', 40)
  INTO product (product_id, product_name, price) VALUES (5, 'Product E', 50)
SELECT * FROM dual;

-- 验证插入的数据
SELECT * FROM product;

-- 提交事务
COMMIT;

Doris-Flink-Connector 同步#

  • Flink Doris Connector 24.0.1

  • flink-sql-connector-oracle-cdc-3.5.0

  • ojdbc8-19.3.0.0

docker exec -it jobmanager bash
bin/flink run \
    -Dexecution.checkpointing.interval=10s \
    -Dparallelism.default=1 \
    -c org.apache.doris.flink.tools.cdc.CdcTools \
    ./lib/flink-doris-connector-1.20-24.0.1.jar \
    oracle-sync-database \
    --database test_db \
    --oracle-conf hostname=127.0.0.1 \
    --oracle-conf port=1521 \
    --oracle-conf username=flinkuser \
    --oracle-conf password="flinkpw" \
    --oracle-conf database-name=helowin \
    --oracle-conf schema-name=FLINKUSER \
    --oracle-conf debezium.log.mining.strategy=online_catalog \
    --oracle-conf debezium.log.mining.continuous.mine=true \
    --oracle-conf debezium.database.history.store.only.captured.tables.ddl=true \
    --including-tables "CUSTOMERS|PRODUCT" \
    --sink-conf fenodes=127.0.0.1:8030 \
    --sink-conf username=root \
    --sink-conf password=\
    --sink-conf jdbc-url=jdbc:mysql://127.0.0.1:9030 \
    --sink-conf sink.label-prefix=label \
    --table-conf replication_num=1

debezium 相关参数

  • --oracle-conf debezium.log.mining.strategy=online_catalog: 设置日志挖掘策略。比其他策略更快,不需要解析重做日志来获取元数据

  • --oracle-conf debezium.log.mining.continuous.mine=true: 启用连续挖掘模式。可以显著提高性能

  • --oracle-conf debezium.database.history.store.only.captured.tables.ddl=true: 只存储被捕获表的 DDL(数据定义语言)历史。减少存储开销

Runtime Environment#

  • Doris 2.1

  • Flink Doris Connector 24.0.1

  • Flink 1.20

  • Flink CDC 3.5.0

  • Oracle Database 11g

References#

  • 使用 Flink 同步 Oracle 数据至 Doris

  • Oracle CDC Connector

previous

Flink CDC Doris

next

ClickHouse Docker

Contents
  • Oracle 安装并配置
  • 配置数据库恢复和归档日志
  • 创建表空间和用户
  • 创建示例表
  • Doris-Flink-Connector 同步
  • Runtime Environment
  • References

By T5750

© Copyright 2026, T5750.