orcal数据库还原备份

 

删除用户及数据库,用于重新导入新数据库
drop user hyscm cascade;

创建表空间
create tablespace HYSCM_DATA logging datafile 'E:\HYSCM_TEST\HYSCM_CS.dbf' size 1024m autoextend on next 200m

创建用户并授权
create user hyscm identified by huscm123 default tablespace hyscm_data;
grant dba to hyscm;

导入
imp hyscm/huscm123@hyscmnew file=E:/hyscm_2020712_1.dmp full=y ignore=n
导出
exp hyscm/huscm123@hyscmnew owner=hyscm file=E:\data_backup\hyscm_2020713_1.dmp log=e:\data_backup\hyscm_20200713_1.log

 --数据库泵还原

drop user hyscm cascade;

create tablespace HYSCM_DATA logging datafile 'D:\HYSCM_CS\HYSCM_CS.dbf' size 1024m autoextend on next 200m

create user hyscm identified by hyscm123 default tablespace HYSCM_DATA;

grant dba to hyscm;


create directory mydump as 'D:\beifen\database';


2.从服务器上面复制下来备份的数据,路径(D:\befen\database),然后放在IMPDP_DIR这个目录下面,然后进行导入。


再创建用户
impdp hyscm/hyscm123 directory=mydump dumpfile=HYSCM_20200819.DMP   TABLE_EXISTS_ACTION=REPLACE

 

posted @ 2020-07-07 09:42  逆水乘舟,不进则退  阅读(194)  评论(0编辑  收藏  举报