首页 > 数据库技术 > 详细

『ORACLE』 数据泵Data Pump中expdp导出(11g)

时间:2017-05-24 23:31:27      阅读:371      评论:0      收藏:0      [点我收藏+]

[oracle@enmo1 ~]$ mkdir datadump
[oracle@enmo1 ~]$ cd datadump/
[oracle@enmo1 datadump]$ pwd
/home/oracle/datadump

SQL> create or replace directory dir_dp as ‘/home/oracle/datadump‘;

Directory created.

SQL> grant read,write on directory dir_dp to scott;

Grant succeeded.

导出表中指定行

[oracle@enmo1 datadump]$ expdp scott/tiger directory = dir_dp dumpfile = emp.dmp tables = emp  query = "‘where deptno = 30 ‘"

[oracle@enmo1 datadump]$ ll
total 136
-rw-r----- 1 oracle oinstall 131072 May 24 21:21 emp.dmp
-rw-r--r-- 1 oracle oinstall 1244     May 24 21:21 export.log

parfile导出表中指定行,用参数文件的好处是,特殊字符不用转义,密码也相对隐藏

[oracle@enmo1 datadump]$ vi par.txt

userid=scott/tiger
directory=dir_dp
dumpfile=emp30_2.dmp
logfile=emp30_2.log
tables=emp
query=‘where deptno = 30‘

[oracle@enmo1 datadump]$ expdp parfile=par.txt

[oracle@enmo1 datadump]$ ls
emp30_2.dmp emp30_2.log emp.dmp export.log par.txt

导出表

[oracle@enmo1 datadump]$ rm *
[oracle@enmo1 datadump]$ ls
[oracle@enmo1 datadump]$ expdp scott/tiger directory = dir_dp dumpfile = emp.dmp tables = emp

[oracle@enmo1 datadump]$ ls
emp.dmp export.log

导出表空间

[oracle@enmo1 datadump]$ expdp system/oracle directory = dir_dp dumpfile = emp.tbp tablespaces = users

导出schema

[oracle@enmo1 datadump]$ expdp scott/tiger directory = dir_dp dumpfile = emp.scm schemas = scott

『ORACLE』 数据泵Data Pump中expdp导出(11g)

原文:http://www.cnblogs.com/KT-melvin/p/6901253.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!