加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle数据库使用DMP文件恢复数据

发布时间:2020-12-12 15:54:56 所属栏目:百科 来源:网络整理
导读:1、创建还原所用的dmp所在的文件夹 create directory 文件夹名 as '/dir' create directory backup as 'backup'; 2、创建表空间 create tablespace 空间名 datafile '.dbf'size 500M autoextend on maxsize unlimited; create tablespace liuwei datafile '.
1、创建还原所用的dmp所在的文件夹

create directory 文件夹名 as '/dir'

create directory backup as 'backup';
2、创建表空间

create tablespace 空间名 datafile '.dbf'size 500M autoextend on maxsize unlimited;

create tablespace liuwei datafile '.dbf'size 500M autoextend on maxsize unlimited;
3、创建用户(与导出时的用户名一致)
create user 用户名
identified by 密码
default tablespace 表空间
temporary tablespace TEMP
profile DEFAULT;
create user Lavi
identified by Lavi
default  tablespace LaviSpace
temporary tablespace TEMP 
profile DEFAULT;
4、对用户进行授权
grant connect to 用户 with admin option ;
grant dba to 用户 with admin option;
grant unlimited tablespace to 用户 with admin option;
grant create session to 用户;
grant connect to Lavi with admin option ;
grant dba to Lavi with admin option;
grant unlimited tablespace to Lavi with admin option;
grant create session to Lavi;
5、进行数据库导入(以上命令要在sqlplus中执行,而导入导出命令要在cmd中执行)
导入要和导出的命令相对应,exp和imp,expdp和impdp

IMPDP USERID='用户名/密码@实例 as sysdba' directory=LOG_FILE_DIR dumpfile=20100816.dmp logfile=20100816.log

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读