在数据库OPEN时报错在线日志文件丢失:
SQL> alter database open;
ERROR at line 1:
ORA-00742: Log read detects lost write in thread 1 sequence 8 block 66888
ORA-00312: online log 2 thread 1:
'/u01/app/oracle/oradata/orcl/O1_MF_2_HN9JYBZ2_.LOG'
ORA-00312: online log 2 thread 1:
'/u01/app/oracle/oradata/orcl/O1_MF_2_HN9JYBX7_.LOG'
尝试进行不完整恢复:
RMAN> run{
2> set until scn 5361863;
3> restore database;
4> recover database;
5> }
executing command: SET until clause
Starting restore at 04-JAN-21
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/SYSTEM01.DBF
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/USERS03.DBF
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/SYSAUX01.DBF
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/UNDOTBS01.DBF
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/EXAMPLE01.DBF
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/orcl/USERS01.DBF
channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/orcl/USERS02.DBF
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2020_12_26/o1_mf_nnndf_TAG20201226T212329_hyhw11cp_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2020_12_26/o1_mf_nnndf_TAG20201226T212329_hyhw11cp_.bkp tag=TAG20201226T212329
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 04-JAN-21
Starting recover at 04-JAN-21
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 04-JAN-21
尝试打开数据库又报错:
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 01/04/2021 00:03:39
ORA-00600: internal error code, arguments: [, [4294967295], [], [], [], [], [], [], [], [], [], []
参考MOS文档(Doc ID 2026541.1)处理办法:
SOLUTIONAt the OS level move the current online redologs: $ mv /<path>/<redo_filename1>.log /<path>/<redo_filename1>.old
$ mv /<path>/<redo_filename2>.log /<path>/<redo_filename2>.old
Try the open with resetlogs again: SQL> recover database using backup controlfile until cancel;
ORA-00279: change <change#generated at <MM/DD/YYYY HH:MI:SS> needed for thread <thread#>
ORA-00289: suggestion: /<path>/<thread#>_<sequence#>_<value>.arc
ORA-00280: change <change#> for thread 1 is in sequence <sequence#>
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL>alter database open resetlogs;
Database altered
[oracle@dbserver ~]$ mv /u01/app/oracle/oradata/orcl/O1_MF_2_HN9JYBZ2_.LOG /u01/app/oracle/oradata/orcl/O1_MF_2_HN9JYBZ2_.LOG1
[oracle@dbserver ~]$ mv /u01/app/oracle/oradata/orcl/O1_MF_2_HN9JYBX7_.LOG /u01/app/oracle/oradata/orcl/O1_MF_2_HN9JYBX7_.LOG1
RMAN> alter database open resetlogs;
Statement processed
问题解决。
|