使用 dba_tab_partitions 视图获得每个分区的参数文件内容,使用 chr(10) 分行
- select
- 'content=data_only'||chr(10)||
- 'directory=data_pump_dir'||chr(10)||
- 'tables=messeries.test:'||PARTITION_NAME||chr(10)||
- 'dumpfile=expdp_test_'||PARTITION_POSITION||'.dmp'||chr(10)||
- 'logfile=expdp_test_'||PARTITION_POSITION||'.log'
- from dba_tab_partitions where table_owner='TEST' and table_name='TEST';
创建 par 文件,复制每一行内容至单独的 par 文件
- content=data_only
- directory=data_pump_dir
- tables=test.test:PART_FIRST
- dumpfile=expdp_test_1.dmp
- logfile=expdp_test_1.log
执行以下命令
- expdp test parfile=01.par
来源: http://www.linuxidc.com/Linux/2017-03/142084.htm