SQL> CREATE PUBLIC DATABASE LINK MYTEST 2 CONNECT TO APPLE IDENTIFIED BY APPLE 3 USING 'life02'
Database link created.
3)复制远程数据库的table到本地数据库来
SQL> COPY FROM APPLE/APPLE@LIFE02 - > CREATE ABC - > USING SELECT * FROM TEST;
Array fetch/bind size is 15. (arraysize is 15) Will commit when done. (copycommit is 0) Maximum long size is 80. (long is 80) Table ABC created.
3 rows selected from APPLE@LIFE02. 3 rows inserted into ABC. 3 rows committed into ABC at DEFAULT HOST connection.
SQL> SELECT * FROM ABC;
ID ---------- 100 200 333
SQL>
4)从本地端表格复制数据到远程数据库表格上
SQL> COPY FROM JACK/JACK@T2 TO APPLE/APPLE@LIFE02 - > INSERT TEST - > USING SELECT * FROM T1; Array fetch/bind size is 15. (arraysize is 15) Will commit when done. (copycommit is 0) Maximum long size is 80. (long is 80) 2 rows selected from JACK@T2. 2 rows inserted into TEST. 2 rows committed into TEST at APPLE@LIFE02.