先创建临时表空间
create temporary tablespace XXX_temp
tempfile 'C:\Database\Oracle\ORCL\XXX_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
创建数据表空间
create tablespace tblspc_XXX
logging
datafile 'C:\Database\Oracle\ORCL\XXX.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
创建用户并指定表空间
create user XXX identified by MM
default tablespace tblspc_XXX
temporary tablespace XXX_temp;
给用户授予权限
grant connect,resource,dba to XXX;
--1.在PL SQL 中sys帐户运行下面一句,这个目录可以指定其他的
create or replace directory backupdir as 'c:\backupdir\';
--2.将备份文件放到e:\backupdir 目录下
--3.在命令行中还原
impdp XXX/MM@orcl directory=backupdir dumpfile=XXX.dump logfile=XXX.log;