expdp 使用参数文件
程序员文章站
2022-03-12 18:22:12
...
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
上一篇: 对局匹配
下一篇: docker常用命令(一)
推荐阅读
-
编写一个函数reverse_string(char * string)(递归实现)实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中的字符串操作函数
-
linux下文本编辑器vim的使用方法(复制、粘贴、替换、行号、撤销、多文件操作)
-
PHP使用fopen函数打开文件提示权限不够问题
-
babel-loader文件预处理器使用详解
-
用nero刻录软件刻录ISO文件的使用指南
-
使用 Iisext.vbs 列出 Web 服务扩展文件的方法
-
使用vbs脚本定时删除N天前的文件
-
vbs Size 属性使用介绍(获取文件大小)
-
使用 Iisext.vbs 删除 Web 服务扩展文件的方法
-
Python实现批量压缩文件/文件夹zipfile的使用