环境变量设置(在Sqlplus中执行)
create or replace directory filepath as ‘D:\ORACLEBACKUP‘;
备份脚本:expdp system/[email protected] directory=filepath dumpfile=UBSCORLUSER20150619.dat logfile=UBSCORLUSER20150619.log schemas=UBSCORLUSER
还原:
1,sqlplus system/[email protected]
2. 删除目标数据库中的ARADMIN用户
drop user UBSCORLUSER cascade;
2. 创建ARADMIN用户
create user UBSCORLUSER identified by UBSCORLUSER default tablespace SYSTEM temporary tablespace temp quota unlimited on system;
3. 赋予数据库权限
grant alter session,create cluster,create database link,create sequence,create session,create synonym,create table,create view,create procedure,create trigger,query rewrite to UBSCORLUSER;
环境变量设置(在Sqlplus中执行)
create or replace directory filepath as ‘D:\oracleData‘;
关闭cmd运行窗口,重新执行cmd
4,还原命令:
impdp system/[email protected] directory=filepath dumpfile=20150407server.DAT logfile=20150407server.log schemas=UBSCORLUSER