win7下Oracle库impdp导入dmp

第一步:创建备份文件存储目录

create or replace directory back_file as 'D:\app\yangxf\back_or_memery_file';

create or replace directory 目录名 as 'D:\app\yangxf\back_or_memery_file';

第二步:创建表空间

create tablespace BASE_DATA datafile 'D:\app\yangxf\oradata\base_tablespace\BASE.dbf' size 100M autoextend on next 50m;

create tablespace 表空间名(与备份文件表空间一致) datafile 'D:\app\yangxf\oradata\base_tablespace\备份文件名.dbf' size 100M autoextend on next 50m;

第三步:创建备份文件用户,指定表空间

create user BASE identified by BASE default tablespace BASE_DATA;

create user 用户名 identified by 密码 default tablespace 表空间名;

第四步:授权用户读写备份文件目录

grant read, write on directory back_file to BASE;

grant read, write on directory 存储目录名 to 用户名;

第五步:授权用户连接、资源、登录、dba权限

grant connect,resource,dba to BASE;

第六步:执行导入语句

impdp system/root@orcl directory=back_file dumpfile=BASE.DMP full=y;

impdp 用户名/密码@实例名 directory=目录名 dumpfile=到导入的文件名.DMP full=y;

 

备注:

删除用户下所有对象

drop user JCSJ cascade;

drop user 用户名 cascade;

删除表空间

drop tablespace JCSJ_DATA including contents and datafiles;

drop tablespace 表空间名 including contents and datafiles;

超级管理员登录

sqlplus sys/root@orcl as sysdba;

sqlplus 用户名/密码@实例名 as sysdba;

 

posted @ 2018-05-22 17:25  好兵帥克  阅读(2138)  评论(0编辑  收藏  举报