exp 用户名/密码@数据库SID
owner=用户名
file=路径/exp_2018.dmp
log=路径/log_2018.log
imp用户名/密码@数据库SID
file=路径/exp_2018.dmp(已存在)
log=路径/imp_2018.log
full=y
ignore=y
1.创建目录
mkdir /hoem/oracle/oracle_bak
连接数据库
sqlplus /nolog
conn sys/7961314@orcl as sysdba
create directory aa as '/hoem/oracle/oracle_bak'
drop directory aa
2.授权
grant read,write on directory aa to system;
3.执行导出
expdp用户名/密码@数据库SID
directory=aa
dumpfile=路径/expdp_2018.dmp
logfile=路径/log_2018.log
schemas=hs_user
1.连接数据库
sqlplus /as sysdba
create directory aa as '/hoem/oracle/oracle_bak'
drop directory aa
2.授权
grant read,write on directory aa to system;
3.执行导入
impdp用户名/密码@数据库SID
directory=aa
dumpfile=路径/expdp_2018.dmp
logfile=路径/log_2018.log
schemas=hs_user
table_exists_actiom=truncate/replace
收起不需要。在线导出出数据库,数据库自带的一种备份手段。不过对于重要的数据库来说,还是建议建立完善的备份系统。expdp只能是一种基本的备份应急手段。
收起不需要停库,逻辑备份的这种方式吧,个人觉得还是要搭配着企业级的专业备份软件共同运行,对于数据一致性,以及查找的便捷性,个人觉得导入导出效果不太理想,如果是长期保留的导出数据,恢复审计数据,还是比较方便的。
收起