Oracle expdp按分区导出生成参数文件

  • 使用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
原文地址:https://www.cnblogs.com/shenfeng/p/ora_expdp_par_gen.html