1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
| [oracle@rac1 ~]$ export ORACLE_SID=orcl11 [oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Apr 2 09:51:24 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup ORACLE instance started.
Total System Global Area 2471931904 bytes Fixed Size 2255752 bytes Variable Size 687867000 bytes Database Buffers 1761607680 bytes Redo Buffers 20201472 bytes Database mounted. ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [115], [49383], [49388], [], [], [], [], [], [], []
-- 查看数据库模式 SQL> select open_mode from v$database;
OPEN_MODE -------------------- MOUNTED --此时数据库启动到mount状态,尝试以resetlogs方式open数据库,也无法打开 SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SQL> recover database; ORA-00283: recovery session canceled due to errors ORA-00600: internal error code, arguments: [krr_read_5], [115], [49383], [], [], [], [], [], [], [], [], [] --查看当前日志文件情况 SQL> select v1.group#, member, sequence#, first_change# from v$log v1, v$logfile v2 where v1.group# = v2.group#;
GROUP# ---------- MEMBER -------------------------------------------------------------------------------- SEQUENCE# FIRST_CHANGE# ---------- ------------- 1 +DATA/orcl/onlinelog/group_1.261.970078827 115 4674751
2 +DATA/orcl/onlinelog/group_2.262.970078829 114 4622551
GROUP# ---------- MEMBER -------------------------------------------------------------------------------- SEQUENCE# FIRST_CHANGE# ---------- -------------
3 +DATA/orcl/onlinelog/group_3.266.970078993 65 4646182
4 +DATA/orcl/onlinelog/group_4.267.970078995
GROUP# ---------- MEMBER -------------------------------------------------------------------------------- SEQUENCE# FIRST_CHANGE# ---------- ------------- 66 4688519
SQL> recover database using backup controlfile until cancel; ORA-00279: change 4674751 generated at 04/01/2018 15:33:57 needed for thread 1 ORA-00289: suggestion : /u01/app/oracle/11g/dbs/arch1_115_970078828.dbf ORA-00280: change 4674751 for thread 1 is in sequence #115 -- 记录住这里提示的change号和sqeuence号,去上边记录中查找文件名
Specify log: {<RET>=suggested | filename | AUTO | CANCEL} +DATA/orcl/onlinelog/group_1.261.970078827 -- 输入文件路径名称,进行恢复 ORA-00279: change 4674751 generated at 04/01/2018 10:23:59 needed for thread 2 ORA-00289: suggestion : /u01/app/oracle/11g/dbs/arch2_65_970078828.dbf ORA-00280: change 4674751 for thread 2 is in sequence #65
Specify log: {<RET>=suggested | filename | AUTO | CANCEL} +DATA/orcl/onlinelog/group_3.266.970078993 ORA-00279: change 4688519 generated at 04/01/2018 18:01:42 needed for thread 2 ORA-00289: suggestion : /u01/app/oracle/11g/dbs/arch2_66_970078828.dbf ORA-00280: change 4688519 for thread 2 is in sequence #66 ORA-00278: log file '+DATA/orcl/onlinelog/group_3.266.970078993' no longer needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL} +DATA/orcl/onlinelog/group_4.267.970078995 Log applied. Media recovery complete. --恢复完成后,再次可以正常打开数据库,重启数据库正常。 SQL> alter database open resetlogs;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE -------------------- READ WRITE
|