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

本地使用impdp导出服务器转储文件,本地使用impdp导入远程数据库用户
1)expdp是可以在客户端上生成转储文件的
2)impdp是可以在不同的实例之间进行数据的迁移复制的

练习1:
1)将远程数据库WSJB用户使用expdp命令导出到本地磁盘的D:\下

Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\windows\system32>sqlplus system/system

SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 1月 10 13:49:34 2013

Copyright (c) 1982, 2007, Oracle.  All rights reserved.


连接到: 
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> input
  1   create public database link wsjb
  2   connect to wsjb identified by wsjbcs
  3   using 'xagxsi_16';
数据库链接已创建。

SQL> select 1 from dual@wsjb;
 1
----------
 1

SQL> create directory chenzw as 'D:\';
目录已创建。

SQL> grant read,write on directory chenzw to public;
授权成功。

SQL> commit; 
提交完成。

SQL>expdp system/system@orcl directory = chenzw dumpfile=wsjb20130110.dmp network_link=wsjb logfile=exp20130110.log schemas=wsjb

 从 Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开

C:\windows\system32>expdp system/system@orcl directory = chenzw dumpfile=wsjb20130110.dmp network_link=wsjb logfile=exp20130110.log schemas=wsjb

Export: Release 11.1.0.6.0 - Production on 星期四, 10 1月, 2013 13:54:23

Copyright (c) 2003, 2007, Oracle.  All rights reserved.

连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
启动 "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/********@orcl directory = chenzw dumpfile=wsjb20130110.dmp network_link=wsjb logfile=exp20130110.log schemas=wsjb 
正在使用 BLOCKS 方法进行估计...
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 93.31 MB
处理对象类型 SCHEMA_EXPORT/USER
处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT
处理对象类型 SCHEMA_EXPORT/ROLE_GRANT
处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE
处理对象类型 SCHEMA_EXPORT/TABLESPACE_QUOTA