expdp system/oracle@orcl schemas=$user dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR
expdp system/oracle@orcl tables=($TABLE1,$TABLE2) dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR
impdp system/oracle@orcl schemas=$user dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR table_exists_action=REPLACE
impdp system/oracle@orcl schemas=$user TRANSFORM=segment_attributes:n dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR table_exists_action=REPLACE
chown oracle -R /u01/app/oracle/admin/EE/dpdump/
-- 查看管理员目录
select * from dba_directories
-- 创建逻辑目录,还需手动创建目录,Oracle不关心目录是否存在,不存在会报错
create directory DP_DIR as 'C:\app\Administrator/admin/orcl/dpdump/'
-- 删除逻辑目录
drop directory DP_DIR
https://www.cnblogs.com/qlqwjy/p/8405164.html
exp system/oracle@orcl file=d:/$dbname.dmp full=y;
exp system/oracle@orcl file=d:/$dbname.dmp full=y rows=N;
exp system/oracle@orcl file=d:/$dbname.dmp owner=$user;
exp system/oracle@orcl file=d:/$dbname.dmp tables=$TABLE1;
imp system/oracle@orcl file=d:/$dbname.dmp log=d:/$dbname.log full=y ignore=y
imp system/oracle@orcl file=d:/$dbname.dmp log=d:/$dbname.log fromuser=$user ignore=y
imp system/oracle@orcl file=d:/$dbname.dmp log=d:/$dbname.log fromuser=$user touser=$newUser
imp system/oracle@orcl file=d:/$dbname.dmp log=d:/$dbname.log fromuser=$user tables=($TABLE1,$TABLE2)