方法一:
内网建一个包含大字段(BLOB)的表,然后通过inser into … select … from …@dblink把数据插入到内网的库表中,直接操作内网库表即可。如:
创建表:
- SQL>create table inner_table select *from outer_table@dblink
插入数据:
- SQL>insert into inner_table select *from outer_table@dblink
这样就把外网表outer_table中的数据写到内网表inner_table中了。
方法二:
在本地创建一张和dblink远程端相同的全局临时表,然后在查询临时表:
--创建临时表:
- SQL>create global temporary table tem_table( … ) on commit delete rows;
- SQL> insert into tem_table select * fromouter_table@dblink;
- xxx rows created.
其实这两种方法都差不多,只不过一个是用的临时表,一个是用的是永久性的表。
