Oracle expdp 参数文件写法

expdp:
官方文档位置:
Data Warehousing and Business Intelligence ->Supporting Documentation(Utilities) -> 2 Data Pump Export
***********************************************************************************************************************************
Data Pump export modes
***********************************************************************************************************************************
Full Export Mode

expdp system/oracle directory=DATA_PUMP_DIR dumpfile=expdp.dmp full=yes NOLOGFILE=YES

使用sys备份scott用户 不计日志 开启并行

expdp hr PARFILE=hr.par
expdp \'sys/oracle as sysdba\' directory=DATA_PUMP_DIR  schemas=scott dumpfile=expdp.dmp NOLOGFILE=YES PARALLEL=4

#也可以把备份命令写入一个.par的文件中
vi scott.par
schemas=scott
directory=DATA_PUMP_DIR
dumpfile=expdp.dmp
NOLOGFILE=YES
PARALLEL=4
INCLUDE=TABLE:"IN('EMP','DEPT')"
INCLUDE=PROCEDURE

expdp \'sys/oracle as sysdba\' parfile=scott.par

***********************************************************************************************************************************
#执行脚本
[oracle@oracle ~]$ expdp \'sys/oracle as sysdba\' parfile=scott.par

Export: Release 11.2.0.3.0 - Production on Thu Oct 11 17:08:15 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  "sys/******** AS SYSDBA" parfile=scott.par 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
. . exported "SCOTT"."EMP"                               8.562 KB      14 rows
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-39168: Object path PROCEDURE was not found.
Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
  /u01/app/oracle/admin/PROD/dpdump/expdp.dmp
Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at 17:08:20

*/


#也可以写查询条件,导出特定条件的数据
vi scott_where.par

directory=DATA_PUMP_DIR
dumpfile=expdp.dmp
NOLOGFILE=YES
PARALLEL=4
QUERY=SCOTT.EMP:"where empno=7788"

#执行脚本
[oracle@oracle ~]$ expdp \'sys/oracle as sysdba\' parfile=scott_where.par

Export: Release 11.2.0.3.0 - Production on Thu Oct 11 17:27:43 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  "sys/******** AS SYSDBA" parfile=scott_where.par 
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
  /u01/app/oracle/admin/PROD/dpdump/expdp.dmp
Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at 17:27:53

*/


expdp scott/scott directory=DATA_PUMP_DIR DUMPFILE=scott.dmp tables=EMP CONTENT= METADATA_ONLY


***********************************************************************************************************************************
#导出表空间
vi tablespace.par

directory=DATA_PUMP_DIR
DUMPFILE=tablespace.dmp
TRANSPORT_TABLESPACES=LFN_NFS
TRANSPORT_FULL_CHECK=NO


expdp \'sys/oracle as sysdba\' parfile=tablespace.par

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值