在 MySQL 和 Oracle 数据库之间传输数据

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6353663/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 23:58:31  来源:igfitidea点击:

Transferring data between MySQL and Oracle databases

mysqloracle

提问by Gidget

Here's the scenario:
I have a MySQL DB, and an Oracle DB, and what I want to do is copy data from MySQL to Oracle, on a scheduled basis.

场景如下:
我有一个 MySQL 数据库和一个 Oracle 数据库,我想做的是按计划将数据从 MySQL 复制到 Oracle。

The process includes just inserting data to a table on the Oracle side, taken from the MySQL db.

该过程只包括将数据插入到 Oracle 端的表中,取自 MySQL 数据库。

Something like this: (oracle command)

像这样:(oracle 命令)

insert into my_oracle_table  
select * from my_mysql_table@my_mysql_db  
where date > sysdate - 7;

What is the best practice for this? Is there a way to connect say to the MySQL db directly from an Oracle stored procedure? Maybe the other way round?

这方面的最佳做法是什么?有没有办法直接从 Oracle 存储过程连接到 MySQL 数据库?也许反过来?

Oracle 11g and MySql 5.1

Oracle 11g 和 MySql 5.1

回答by Sathyajith Bhat

Create a database linkfrom your Oracle server to the MySQL server.

创建从 Oracle 服务器到 MySQL 服务器的数据库链接

Once the database link has been established, you can use the standard insert into.. select fromsyntax

建立数据库链接后,您可以使用标准insert into.. select from语法

insert into my_oracle_table  
select * from my_mysql_table@dblinkname
where date > sysdate - 7;


If you want to do this on a scheduled basis, use the job schedulerto schedule the transfer.

如果您想按计划执行此操作,请使用作业调度程序来安排传输。

回答by UltraCommit

You can use O.D.I., Oracle Data Integrator.

您可以使用 ODI、Oracle 数据集成器。

http://www.oracle.com/technetwork/middleware/data-integrator/index.html

http://www.oracle.com/technetwork/middleware/data-integrator/index.html

Oracle Data Integrator is a comprehensive data integration platform that covers all data integration requirements: from high-volume, high-performance batch loads, to event-driven, trickle-feed integration processes, to SOA-enabled data services.

Oracle Data Integrator 是一个全面的数据集成平台,涵盖了所有数据集成需求:从大容量、高性能的批处理加载到事件驱动的涓流集成流程,再到支持 SOA 的数据服务。