日期:2014-05-16  浏览次数:20743 次

expdp导出服务器上的数据到本地磁盘的方法?
我的操作步骤是这样的:
1,创建db link
create public database link orlink connect to orcl identified by orcl using 'orcl';
然后执行下面查询可以查到数据:
select * from global_name@orlink;
2,创建目录(directory)
create or replace directory ytdump as 'J:\dump';
3,用另一个用户(具备dba权限)
grant read,write on directory ytdump to oacl;
4,然后用数据泵导出
expdp orcl/orcl directory=ytdump,dumpfile=dump.dmp,full=y,network_link=orlink
但是报错
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORA-39001: invalid argument value
ORA-39200: Link name "orlink" is invalid.
ORA-02019: connection description for remote database not found

------解决方案--------------------
expdp 是server 端工具,但可以通过NETWORK_LINK 参数实现远端导出,但是前提是远端也安装有Oracle 数据库,只有CLIENT 端是没有办法利用数据泵的。