背景:
Oracle库之间的数据同步有以下的几种方式:
1、把A表的数据导出到sql文件,形成insert语句,然后执行插入到B表
2、建立两库之间的dblink,然后使用
create table B as select * from A@dblink where ...
或者
insert into B
select * from A@dblink where ...
3、使用exp的方式,导出数据,然后imp到指定的库表
对于大文本数据对数据加载可以使用sqlload,以下是操作步骤
1,创建表
create table PRODUCTS
(
product_id NUMBER(22) not null,
product_type_id NUMBER(22),
name VARCHAR2(30) not null,
description VARCHAR2(50),
price NUMBER(22)
)
2,创建加载的数据文件
[root@dongjj-pc-01 file]#touch PROD