我们有一个要求,我们必须将数据从Oracle数据库拉到MariaDB,应用程序从那里访问该数据。有没有人能帮助我,我们如何才能做到这一点?谢谢你我知道数据链接,我们可以把数据从mariaDB拉到Oracle,但不确定以相反的方式
v1uwarro1#
MariaDB Connect Engine具有ODBC和JDBC数据类型,可以连接到Oracle。粗略说明:1.安装MariaDB-connect-engine和unixODBC1.在/etc/odbcinst. ini中配置Oracle ODBC驱动程序1.在Oracle/. odbc.ini中将Oracle DSN配置到服务器1.将ha_connect.so加载到MariaDB中(my.cnf中的plugin-load-add=ha_connect.so)1.创建mariadb表连接到Oracle -create table table_maria engine=connect table_type=ODBC tabname='t' Connection='DSN=oracle' SRCDEF='select * from t';1.创建本地表; create table table_maria_local like table_maria; alter table table_maria_local engine=InnoDB1.复制数据; insert into table_maria_local select * from table_maria来源:blog
ha_connect.so
my.cnf
plugin-load-add=ha_connect.so
create table table_maria engine=connect table_type=ODBC tabname='t' Connection='DSN=oracle' SRCDEF='select * from t';
create table table_maria_local like table_maria; alter table table_maria_local engine=InnoDB
insert into table_maria_local select * from table_maria
1条答案
按热度按时间v1uwarro1#
MariaDB Connect Engine具有ODBC和JDBC数据类型,可以连接到Oracle。
粗略说明:
1.安装MariaDB-connect-engine和unixODBC
1.在/etc/odbcinst. ini中配置Oracle ODBC驱动程序
1.在Oracle/. odbc.ini中将Oracle DSN配置到服务器
1.将
ha_connect.so
加载到MariaDB中(my.cnf
中的plugin-load-add=ha_connect.so
)1.创建mariadb表连接到Oracle -
create table table_maria engine=connect table_type=ODBC tabname='t' Connection='DSN=oracle' SRCDEF='select * from t';
1.创建本地表;
create table table_maria_local like table_maria; alter table table_maria_local engine=InnoDB
1.复制数据;
insert into table_maria_local select * from table_maria
来源:blog