方法四:修改系统参数方法1、 插入数据SQL>; select * from test;
TEL
----------
1 2 3 4
SQL>; insert into test values(5);
1 row created.
SQL>; commit;
Commit complete.
SQL>;2、 强行关闭
SQL>; shutdown abort ORACLE instance shut down.
SQL>;
3、 手工模拟删除redo
4、 启动db
SQL>; startup ORACLE instance started.
Total System Global Area 353862792 bytes
Fixed Size 730248 bytes
Variable Size 285212672 bytes
Database Buffers 67108864 bytes
Redo Buffers 811008 bytes Database mounted.
ORA- 00313: open failed for members of log group 3 of thread 1 ORA-00312: online log 3 thread 1: '/T3/ORACLE/oradata/ORA9/redo03.log'
ORA- 27037: unable to obtain file status SVR4 Error: 2: No such file or directory Additional information: 3 5、 尝试使用前3中方法中最简单的SQL>; recover database until cancel;ORA-00279: change 550174 generated at 09/02/2005 16:00:19 needed for thread 1 ORA-00289: suggestion : /T3/ORACLE/arch/1_1.dbf ORA-00280: change 550174 for thread 1 is in sequence #1 Specify log: {;=suggested | filename | AUTO | CANCEL}看来不行6、 修改init.ora,加入一行_allow_resetlogs_corruption=true 7、 启动with pfile SQL>; startup ORACLE instance started. Total System Global Area 320308312 bytes Fixed Size 730200 bytes Variable Size 285212672 bytes Database Buffers 33554432 bytes Redo Buffers 811008 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL>; host ls /T3/ORACLE/oradata/ORA9/redo* /T3/ORACLE/oradata/ORA9/redo*: No such file or directory SQL>; alter database open resetlogs;Database altered.
SQL>; host ls /T3/ORACLE/oradata/ORA9/redo* /T3/ORACLE/oradata/ORA9/redo01.log /T3/ORACLE/oradata/ORA9/redo02.log /T3/ORACLE/oradata/ORA9/redo03.log 8、 检验数据SQL>; select * from test.test;
TEL
----------
1 2 3 4
SQL>;看到了吧,我们前面由于执行了SHUTDOWN ABORT,这时候对数据的修改还没有保存到数据文件中,虽然执行了COMMIT,这个时候还在联机日志中,等待CKPT触发DBWR写入 DATAFILE,但是这个时候执行了SHUTDOWN ABORT,redo被删除后,里面的信息也就丢了,造成数据丢失9、 备份,去掉那个参数[@more@]
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/18921899/viewspace-1017276/
,如需转载,请注明出处,否则将追究法律责任。