expdp同一个用户下的多表导出导入

发布时间 2023-05-26 10:22:34作者: 南大仙

expdp expuser/oracle parfile=exptable.par content=metadata_only cluster=n
编辑exptable.par文件
more exptable.par
dumpfile=mdm.dmp
logfile=mdm.log
schemas=mdm
directory=expdp_dmp

exclude=statistics

flashback_scn=3523577018
PARALLEL=4
COMPRESSION=all
include=TABLE:"IN (select OWNER,TABLE_NAME from dba_tables where owner='MDM2' and table_name like 'W_%' escape '_')"

也可以创建一个exptable表,将需要导出导入的表名复制进去
create table exptable as select table_name from dba_tables where ......

然后

include=TABLE:"IN (select TABLE_NAME from exptable)"