1 ORA-00289: suggestion : /u01/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_18/o1_mf_1_177_%u_.arc ORA-00280: change 983931 for thread 1 is in sequence #177 ORA-00278: log file '/u01/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_18/o1_mf_1_176_b1nwn43r_.arc' no longer needed for this recovery
ORA-00279: change 983974 generated at 09/18/2014 13:51:24 needed for thread 1 ORA-00289: suggestion : /u01/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_18/o1_mf_1_178_%u_.arc ORA-00280: change 983974 for thread 1 is in sequence #178 ORA-00278: log file '/u01/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_18/o1_mf_1_177_b1nwpwxb_.arc' no longer needed for this recovery
ORA-00308: cannot open archived log '/u01/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_18/o1_mf_1_178_b1nx9ry9_.arc' ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory Additional information: 3
当执行auto后,第一个建议的归档位置是174,然后到175、176、177,都没有问题,一直到178,提示文件无法找到,由于178、179、180这3个归档日志被移走了,模拟被删除的情况,数据库无法自动获取到这3个归档日志,也就无法把datafile 6前推到数据库正常关闭前的一致性状态,这个时候想要恢复,就只能通过BBED工具来修改数据文件头信息来实现了,数据库自身以无法完成这个任务,如果这个数据文件对整个数据库而言并不是非常重要,那么可以先offline该文件,然后一致性打开数据库,当然,这个数据文件中的数据也就丢失了
--使datafile 6 offline SQL> alter database datafile 6 offline;
Database altered.
SQL> alter database open;
Database altered.
SQL> select file#,name,status from v$datafile;
FILE# NAME STATUS ---------- --------------------------------------------- ------- 1 /u01/app/oracle/oradata/ora10g/system01.dbf SYSTEM 2 /u01/app/oracle/oradata/ora10g/undotbs01.dbf ONLINE 3 /u01/app/oracle/oradata/ora10g/sysaux01.dbf ONLINE 4 /u01/app/oracle/oradata/ora10g/users01.dbf ONLINE 5 /u01/app/oracle/oradata/ora10g/example01.dbf ONLINE 6 /u01/app/oracle/oradata/ora10g/zlm01.dbf OFFLINE
6 rows selected.
SQL> select * from zlm.test1; select * from zlm.test1 * ERROR at line 1: ORA-00376: file 6 cannot be read at this time ORA-01110: data file 6: '/u01/app/oracle/oradata/ora10g/zlm01.dbf'
虽然打开了数据库,但测试数据表还是丢失了,丢失了归档,又没有备份过归档,那么丢数据库是在所难免得了,又一次证明了归档对数据恢复的重要性,由于刚才并未真正地删除归档,只是使了一个trick,那么就当我们之前对归档做了个手动备份,现在来恢复丢失的归档(mv回原归档路径)
SQL> shutdown immediate
Database closed. Database dismounted. ORACLE instance shut down. SQL> ! cd[oracle@ora10g ~]$ cd $ORACLE_BASE/flash_recovery_area/ORA10G/archivelog [oracle@ora10g archivelog]$ ll -lrth total 516K drwxr-x--- 2 oracle oinstall 4.0K Sep 12 10:33 2014_09_12 drwxr-x--- 2 oracle oinstall 4.0K Sep 15 17:19 2014_09_15 drwxr-x--- 2 oracle oinstall 4.0K Sep 17 12:30 2014_09_16 drwxr-x--- 2 oracle oinstall 4.0K Sep 18 10:15 2014_09_17 -rw-r----- 1 oracle oinstall 477K Sep 18 14:01 o1_mf_1_178_b1nx9ry9_.arc -rw-r----- 1 oracle oinstall 1.0K Sep 18 14:01 o1_mf_1_179_b1nx9y1k_.arc -rw-r----- 1 oracle oinstall 7.0K Sep 18 14:01 o1_mf_1_180_b1nxb6q1_.arc drwxr-x--- 2 oracle oinstall 4.0K Sep 18 14:25 2014_09_18 [oracle@ora10g archivelog]$ mv *.arc ./2014_09_18 [oracle@ora10g archivelog]$ cd 2014_09_18 [oracle@ora10g 2014_09_18]$ ll -lrth total 9.5M -rw-r----- 1 oracle oinstall 2.4M Sep 18 10:10 o1_mf_1_172_b1nhskdd_.arc -rw-r----- 1 oracle oinstall 469K Sep 18 10:14 o1_mf_1_173_b1nj0wxp_.arc -rw-r----- 1 oracle oinstall 6.1M Sep 18 13:49 o1_mf_1_174_b1nwmrpv_.arc -rw-r----- 1 oracle oinstall 1.0K Sep 18 13:49 o1_mf_1_175_b1nwmzo4_.arc -rw-r----- |