EXP/IMP(expdp/impdp)DBA日常使用较多的工具之一,是迁移数据的得力助手。常规的迁移方式先使用EXP导出DMP文件,然后传输DMP文件到目标数据库,再用IMP导入。这种迁移方式需要使用中间DMP文件传输交换,有时候比较麻烦。而10Gimpdp则可以通过DB LINK的方式直接从远程数据库导入数据,省去EXP生成中间DMP文件的步骤。其实这种方式非常简单,只需要3步即可:

1、  创建Directory

create or replace directory  expdp_dir as '/home/oracle/exp_dir';

2、  创建DB LINK

create database link test connect to test identified by test using ’test’;

3、  利用IMPDP导入数据:

        impdp system/admin SCHEMAS=(marven,marven1,marven2) directory=expdp_dir network_link=test logfile=imp.log