用备份控制文件的恢复,控制文件中不包含数据文件,但联机日志中有
alter database backup controlfile to 'D:\control.ctl';
create tablespace tp1 datafile 'D:/tp1.dbf' size 10M;
create table t1(id int,name varchar2(10)) tablespace tp1;
insert into t1 values(1,'pl1');
commit;
停服务==>services.msc==>停oracle进程
rm -rf control*
shutdown abort;
拷贝 D:\control.ctl D:\app\administrator\oradata\orcl\control01.ctl
startup mount;
select file#,checkpoint_change# from v$datafile;
select file#,checkpoint_change# from v$datafile_header;
alter database open; //提示控制文件旧了
recover database using backup controlfile;
select * from v$log 找current的log
输入D:\oradata\orcl\redo02.log --状态是current
提示有一个文件不识别
select file#,name from v$datafile;
alter database rename file'D:\app/administrator\product\11.2.0\dbhome_1\database\UNNAMED00005' to 'D:\tp1.dbf';
recover database using backup controlfile;
输入:/oradata/orcl/redo02.log --一select * from v$log;
alter database open resetlogs;
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。