ORACLE数据库全库备份与恢复——exp,imp,expdp,impdp

exp

exp 用户名/密码@数据库SID

owner=用户名

file=路径/exp_2018.dmp

log=路径/log_2018.log

imp

imp用户名/密码@数据库SID

file=路径/exp_2018.dmp(已存在)

log=路径/imp_2018.log

full=y

ignore=y

expdp

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

impdp

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

你可能感兴趣的:(ORACLE数据库全库备份与恢复——exp,imp,expdp,impdp)