expdp 使用参数文件

os: centos 7.4
db: oracle 11.2.0.4

directory

# su - oracle
$ mkdir peiyb
$ cd peiyb
$ pwd
/home/oracle/peiyb

SQL> set lines 300;
set pages 300;
col owner format a10;
col directory_name format a30;
col directory_path format a70;

SQL> 
SQL> select * from dba_directories;

OWNER	   DIRECTORY_NAME		  DIRECTORY_PATH
---------- ------------------------------ ----------------------------------------------------------------------
SYS	       SUBDIR			      /u01/app/oracle/product/11.2.0/db_1/demo/schema/order_entry//2002/Sep
SYS	       SS_OE_XMLDIR 		  /u01/app/oracle/product/11.2.0/db_1/demo/schema/order_entry/
SYS	       LOG_FILE_DIR 		  /u01/app/oracle/product/11.2.0/db_1/demo/schema/log/
SYS	       MEDIA_DIR			  /u01/app/oracle/product/11.2.0/db_1/demo/schema/product_media/
SYS	       DATA_FILE_DIR		  /u01/app/oracle/product/11.2.0/db_1/demo/schema/sales_history/
SYS	       XMLDIR			      /u01/app/oracle/product/11.2.0/db_1/rdbms/xml
SYS	       ORACLE_OCM_CONFIG_DIR  /u01/app/oracle/product/11.2.0/db_1/ccr/hosts/node1/state
SYS	       DATA_PUMP_DIR		  /u01/app/oracle/product/11.2.0/db_1/rdbms/log/
SYS	       ORACLE_OCM_CONFIG_DIR2 /u01/app/oracle/product/11.2.0/db_1/ccr/state

9 rows selected.

SQL> create directory PEIYB_DATA_PUMP_DIR as '/home/oracle/peiyb/';

Directory created.

expdp

$ vi expdp.par

userid='/ as sysdba'
directory=PEIYB_DATA_PUMP_DIR
dumpfile=expdp_20200227_%U.dmp
job_name=expdp_20200227
logfile=expdp_20200227.log
cluster=n
compression=all
content=data_only
filesize=10g
parallel=4
tables=scott2.tmp_t0

使用 nohup ,预防连接断开

$ nohup expdp parfile=expdp.par & 

$ tail -f nohup.out 

Export: Release 11.2.0.4.0 - Production on Wed Feb 26 13:51:06 2020

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SYS"."EXPDP_20200227":  /******** AS SYSDBA parfile=expdp.par 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
. . exported "SCOTT2"."TMP_T0"                           6.148 KB    1000 rows
Master table "SYS"."EXPDP_20200227" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.EXPDP_20200227 is:
  /home/oracle/peiyb/expdp_20200227_01.dmp
  /home/oracle/peiyb/expdp_20200227_02.dmp
Job "SYS"."EXPDP_20200227" successfully completed at Wed Feb 26 13:51:10 2020 elapsed 0 00:00:03

查看 directory 下生成的文件

$ ls -l /home/oracle/peiyb/
total 44
-rw-r----- 1 oracle asmadmin 12288 Feb 26 13:51 expdp_20200227_01.dmp
-rw-r----- 1 oracle asmadmin 20480 Feb 26 13:51 expdp_20200227_02.dmp
-rw-r--r-- 1 oracle asmadmin  1044 Feb 26 13:51 expdp_20200227.log
-rw-r--r-- 1 oracle oinstall   222 Feb 26 13:48 expdp.par
-rw------- 1 oracle oinstall  1037 Feb 26 13:51 nohup.out

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数据库人生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值