数据泵通过dblink使用参数network_link执行IMPDP/EXPDP

ORCL1 是源端,ORCL2是目标端

1. IMPDP + network_link, 直接将源端数据导入到目标库中(DUMP文件不落地)

--在ORCL2上创建DBLINK到ORCL1

create [public] database link connect to identified by using '';

create public database link scms_test connect to dbmt identified by  dbmt using '//192.168.1.144:1521/scms';

create public database link to_orcl1 connect to system identified by oracle using 'ORCL1';

--在ORCL2上执行IMPDP
$ impdp \'/ as sysdba \' directory=DUMP_DIR logfile=impdp_to_orcl2.log network_link=to_orcl1 schemas=scott
 

2 EXPDP + network_link, 直接将源端库上的数据,导出到目标端服务器上

--在ORCL2上创建DBLINK到ORCL1
create public database link to_orcl1 connect to system identified by oracle using 'ORCL1';

--在ORCL2上执行EXPDP,导出的DUMP文件在ORCL2上
expdp \'/ as sysdba \' directory=DUMP_DIR logfile=expdp_from_orcl1.log network_link=to_orcl1 schemas=scott parallel=2

你可能感兴趣的:(Oracle备份恢复)