--操作系统上创建目录
su - root
mkdir -p /oradata/restore
chown -R oracle:oinstall /oradata/restore
--数据库创建目录
create directory dir_restore as '/oradata/restore';
grant read,write on directory dir_restore to ENTSERVICE;
--查看
col DIRECTORY_PATH for a50
set lin 1000
select OWNER,DIRECTORY_NAME,DIRECTORY_PATH from dba_directories;
通过parfile导出
--编写cat exp_mes_new0525.par
userid="/ as sysdba"
DIRECTORY=DATA_PUMP_DIR
dumpfile=expdp_tab_20210525_all_%U.dmp
logfile=expdp_tab_20210525_all.log
tables=userA.tabA
,userA.tabB
,userA.tabC
,userA.tabD
CONTENT=all ??
query=
userA.tabC:"where mdate>to_number(to_char(SYSDATE - 90, 'yyyymmdd'))",
userA.tabD:"where mdate >= to_number(to_char(SYSDATE - 90, 'yyyymmdd'))",
COMPRESSION=ALL ?
exclude=STATISTICS
PARALLEL=10
--导出
nohup expdp parfile=exp_tab_0525.par &
通过parfile导出
--编写cat exp_mes_new0525.par
userid="/ as sysdba"
DIRECTORY=DATA_PUMP_DIR
dumpfile=expdp_tab_20210525_all_%U.dmp
logfile=expdp_tab_20210525_all.log
tables=userA.tabA
,userA.tabB
,userA.tabC
,userA.tabD
CONTENT=all ??
query=
userA.tabC:"where mdate>to_number(to_char(SYSDATE - 90, 'yyyymmdd'))",
userA.tabD:"where mdate >= to_number(to_char(SYSDATE - 90, 'yyyymmdd'))",
COMPRESSION=ALL ?
exclude=STATISTICS
PARALLEL=10
--导出
nohup expdp parfile=exp_tab_0525.par &