您现在的位置是:首页 >其他 >Oracle Recovery Tools快速恢复断电引起的无法正常启动数据库----惜分飞网站首页其他

Oracle Recovery Tools快速恢复断电引起的无法正常启动数据库----惜分飞

惜分飞 2023-05-30 16:00:02
简介Oracle Recovery Tools快速恢复断电引起的无法正常启动数据库----惜分飞

由于异常断电,数据库启动报错ORA-01113和ORA-01110,ORA-00322和ORA-00312以及ORA-00314和ORA-00312错误

Mon Apr 17 09:35:04 2023

ALTER DATABASE OPEN

Errors in file D:APPADMINISTRATORdiag dbmsorclorcl raceorcl_ora_10192.trc:

ORA-01113: 文件 1 需要介质恢复

ORA-01110: 数据文件 1: 'D:APPADMINISTRATORORADATAORCLSYSTEM01.DBF'

ORA-1113 signalled during: ALTER DATABASE OPEN...

Mon Apr 17 09:35:05 2023

Errors in file D:APPADMINISTRATORdiag dbmsorclorcl raceorcl_m000_9788.trc:

ORA-00322: 日志 6 (用于线程 1) 不是最新副本

ORA-00312: 联机日志 6 线程 1: 'D:APPADMINISTRATORORADATAORCLREDO06.LOG'

Errors in file D:APPADMINISTRATORdiag dbmsorclorcl raceorcl_m000_9788.trc:

ORA-00314: 日志 7 (用于线程 1) 要求的 sequence# 15257 与 15248 不匹配

ORA-00312: 联机日志 7 线程 1: 'D:APPADMINISTRATORORADATAORCLREDO07.LOG'

客户那边技术尝试强制拉库之后,报ORA-00704、ORA-01555等错误,数据库启动失败

Mon Apr 17 10:10:49 2023

alter database open resetlogs

RESETLOGS is being done without consistancy checks. This may result

in a corrupted database. The database should be recreated.

RESETLOGS after incomplete recovery UNTIL CHANGE 3159276957

Resetting resetlogs activation ID 1558785994 (0x5ce92fca)

Mon Apr 17 10:11:11 2023

Setting recovery target incarnation to 3

Mon Apr 17 10:11:11 2023

Assigning activation ID 1662170916 (0x6312b724)

Thread 1 opened at log sequence 1

  Current log# 1 seq# 1 mem# 0: D:APPADMINISTRATORORADATAORCLREDO01.LOG

Successful open of redo thread 1

Mon Apr 17 10:11:11 2023

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

Mon Apr 17 10:11:12 2023

SMON: enabling cache recovery

ORA-01555 caused by SQL statement below (SQL ID: 4krwuz0ctqxdt, SCN: 0x0000.bc4ebda4):

select ctime, mtime, stime from obj$ where obj# = :1

Errors in file D:APPADMINISTRATORdiag dbmsorclorcl raceorcl_ora_9324.trc:

ORA-00704: 引导程序进程失败

ORA-00704: 引导程序进程失败

ORA-00604: 递归 SQL 级别 1 出现错误

ORA-01555: 快照过旧: 回退段号 10 (名称为 "_SYSSMU10_3905543278$") 过小

Errors in file D:APPADMINISTRATORdiag dbmsorclorcl raceorcl_ora_9324.trc:

ORA-00704: 引导程序进程失败

ORA-00704: 引导程序进程失败

ORA-00604: 递归 SQL 级别 1 出现错误

ORA-01555: 快照过旧: 回退段号 10 (名称为 "_SYSSMU10_3905543278$") 过小

Error 704 happened during db open, shutting down database

USER (ospid: 9324): terminating the instance due to error 704

Instance terminated by USER, pid = 9324

ORA-1092 signalled during: alter database open resetlogs...

然后尝试一系列操作,比如重建ctl,再次拉库等等,均未绕过该错误.对于ORA-704 ORA-01555错误,使用开发的小工具Oracle Recovery Tools可以一键式解决,参考处理过的类似文章:Oracle Recovery Tools恢复—ORA-00704 ORA-01555故障,不过最近发布的版本中增加了直接修改内存SCN功能,可以更加快速的解决给问题
 


修复之后,数据库open成功

SQL> alter database open;

数据库已更改。

SQL> shutdown immediate;

数据库已经关闭。

已经卸载数据库。

ORACLE 例程已经关闭。

SQL> startup pfile='d:/pfile.txt' mount;

ORACLE 例程已经启动。

Total System Global Area 1.7170E+10 bytes

Fixed Size                  2262088 bytes

Variable Size            1.3153E+10 bytes

Database Buffers         3959422976 bytes

Redo Buffers               54947840 bytes

数据库装载完毕。

SQL> select name from v$datafile where name like '%MISSING%';

NAME

--------------------------------------------------------------------------------

D:APPADMINISTRATORPRODUCT11.2.0DBHOME_1DATABASEMISSING00012

D:APPADMINISTRATORPRODUCT11.2.0DBHOME_1DATABASEMISSING00013

已选择2行。

很不幸技术在尝试重建ctl的恢复的过程中遗漏了两个数据库文件,通过Oracle Recovery Tools再次进行恢复
 


在sqlplus中恢复这两个文件成功

SQL> alter database rename file 'D:APPADMINISTRATORPRODUCT11.2.0DBHOME_1DATABASEMISSING00012'

   2 to 'D:oradataXIFENFEI_04.DBF';

数据库已更改。

SQL> alter database rename file 'D:APPADMINISTRATORPRODUCT11.2.0DBHOME_1DATABASEMISSING00013'

   2 to 'D:oradataXIFENFEI_5.DBF';

数据库已更改。

SQL> alter database datafile 12,13 online;

数据库已更改。

SQL>

SQL>

SQL> alter database open ;

alter database open

*

第 1 行出现错误:

ORA-01113: 文件 12 需要介质恢复

ORA-01110: 数据文件 12: 'D:ORADATAXIFENFEI_04.DBF'

SQL> recover datafile 12;

完成介质恢复。

SQL> recover datafile 13;

完成介质恢复。

SQL> alter database open;

数据库已更改。

至此数据库基本上恢复完成,剩余工作就是逻辑导出导入.

风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。