数据泵备份还原
2019-01-02 本文已影响0人
zdz_peng
# 创建表空间
CREATE TABLESPACE monitor
LOGGING
DATAFILE 'C:\app\Administrator\oradata\orcl\monitor.dbf'
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
# 创建用户,指定表空间
CREATE USER monitor IDENTIFIED BY monitor
ACCOUNT UNLOCK
DEFAULT TABLESPACE monitor;
# 给用户赋权限
GRANT CONNECT,RESOURCE TO monitor;
GRANT DBA TO monitor;
# 给用户操作目录的权限
grant read,write on directory dpump to monitor;
expdp monitor/pass@orcl schemas=monitor dumpfile=monitor20181229.dmp directory=dpump logfile=monitor20181229.log version=11.1.0.6.0 --content=METADATA_ONLY
impdp monitor/monitor@127.0.0.1/orcl directory=dpump remap_schema=monitor:monitor remap_tablespace=monitor:monitor dumpfile=MONITOR20181229.DMP