oracle 11g数据库 DMP还原数据库



--------------------------
jd :表空间 注意:表空间和要和还原表空间一致
--------------------------

--本地登陆 cmd下直接执行
sqlplus/as sysdba;

--修改密码
alter user system identified by 123456;


----创建表空间
create tablespace jd
logging
datafile 'D:\Oracle\data\jd.ora' size 100M reuse
extent management local segment space management auto;

----创建用户
create user jduser
identified by "jduser"
default tablespace jd
temporary tablespace temp
profile default
quota unlimited on jd;

---授权
grant connect to jduser;
grant exp_full_database to jduser;
grant imp_full_database to jduser;
grant connect,resource,dba to jduser;

--并给用户解锁
alter user jduser account unlock;

--创建expdir
create or replace directory expdir as 'D:/';

--还原数据库 cmd下直接执行
impdp jduser/jduser directory=expdir dumpfile=JDGS_20170925_123127.DMP

 

posted @ 2018-03-28 15:24  zhaoyan_dev  阅读(725)  评论(0编辑  收藏  举报