生产库由于空间不够,没有足够的空间存放dmp文件,此时可使用DBLINK直接导出至目标库方法,dmp文件不落地至生产库,直接导出至目标库。
1.目标数据库环境创建到生产库的DBLINK
create public database link expdptest connect to ray identified by ray using 'expdptest';
2.目标数据库环境创建directory 指定EXPDP备份的路径
create expdptest_dir as '/home/oracle';
3.目标数据库环境创建备份用的账户
SQL> create user expdptest identified by expdptest;
SQL> grant dba to expdptest;
4.运行EXPDP备份—
指定生产库的schemas、指定DBLINK
$ expdp expdptest/expdptest directory=expdptest_dir schemas=ray dumpfile=ray.dmp logfile=ray.log network_link='expdptest'