环境:OEL 5.7 + Oracle 10.2.0.5 Clusterware + Oracle 10.2.0.5 RAC

故障:数据库open时报错ORA-1172,ORA-1151

1.故障详细

几年前的10gRAC实验环境,整体冷备迁移到新环境时,无法正常启动数据库,手工尝试也无法正常启动,报错如下:

Mon Aug 14 10:04:13 EDT 2017
ALTER DATABASE OPEN
This instance was first to open
Block change tracking file is current.
Mon Aug 14 10:04:14 EDT 2017
Beginning crash recovery of 2 threads
Mon Aug 14 10:04:14 EDT 2017
Started redo scan
Mon Aug 14 10:04:14 EDT 2017
Completed redo scan
337 redo blocks read, 85 data blocks need recovery
Mon Aug 14 10:04:14 EDT 2017
Started redo application at
Thread 1: logseq 21, block 71672
Thread 2: logseq 17, block 33379
Mon Aug 14 10:04:14 EDT 2017
Recovery of Online Redo Log: Thread 1 Group 1 Seq 21 Reading mem 0
Mem# 0: +ZHAOJINGYU/jy/onlinelog/group_1.262.839673937
Mem# 1: +ZHAOJINGYU/jy/onlinelog/group_1.263.839673939
Mon Aug 14 10:04:14 EDT 2017
Recovery of Online Redo Log: Thread 2 Group 3 Seq 17 Reading mem 0
Mem# 0: +ZHAOJINGYU/jy/onlinelog/group_3.269.839674171
Mem# 1: +ZHAOJINGYU/jy/onlinelog/group_3.270.839674173
RECOVERY OF THREAD 1 STUCK AT BLOCK 41 OF FILE 2
Mon Aug 14 10:04:27 EDT 2017
Abort recovery for domain 0
Mon Aug 14 10:04:27 EDT 2017
Aborting crash recovery due to error 1172
Mon Aug 14 10:04:27 EDT 2017
Errors in file /s01/oracle/admin/jy/udump/jy1_ora_18982.trc:
ORA-01172: recovery of thread 1 stuck at block 41 of file 2
ORA-01151: use media recovery to recover block, restore backup if needed
ORA-1172 signalled during: ALTER DATABASE OPEN...
Mon Aug 14 10:04:30 EDT 2017
Shutting down instance (abort)
License high water mark = 1
Instance terminated by USER, pid = 19144

2.原因定位

根据MOS文档 Error ORA-01219 , ORA-01172, ORA-01151, ORA-01033 (文档 ID 1605148.1)
结合自己这里的实际情况,怀疑是之前数据库没有正常关闭导致。
试图在mount下进行recover database操作。

startup mount
recover database;
ALTER DATABASE OPEN;

3.尝试修复

我这里实际解决过程如下:

3.1 查看状态发现数据库实例资源始终没有启动:

[oracle@rac1-server crsd]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.jy.db application ONLINE OFFLINE
ora....y1.inst application ONLINE OFFLINE
ora....y2.inst application ONLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac1-server
ora....ER.lsnr application ONLINE ONLINE rac1-server
ora....ver.gsd application ONLINE ONLINE rac1-server
ora....ver.ons application ONLINE ONLINE rac1-server
ora....ver.vip application ONLINE ONLINE rac1-server
ora....SM2.asm application ONLINE ONLINE rac2-server
ora....ER.lsnr application ONLINE ONLINE rac2-server
ora....ver.gsd application ONLINE ONLINE rac2-server
ora....ver.ons application ONLINE ONLINE rac2-server
ora....ver.vip application ONLINE ONLINE rac2-server

3.2 尝试手工启动数据库

[oracle@rac1-server crsd]$ srvctl start database -d jy
PRKP-1001 : Error starting instance jy1 on node rac1-server
CRS-0215: Could not start resource 'ora.jy.jy1.inst'.
PRKP-1001 : Error starting instance jy2 on node rac2-server
CRS-0215: Could not start resource 'ora.jy.jy2.inst'.

尝试手工启动数据库失败,再次查询状态:

[oracle@rac1-server crsd]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.jy.db application ONLINE OFFLINE
ora....y1.inst application ONLINE OFFLINE
ora....y2.inst application ONLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac1-server
ora....ER.lsnr application ONLINE ONLINE rac1-server
ora....ver.gsd application ONLINE ONLINE rac1-server
ora....ver.ons application ONLINE ONLINE rac1-server
ora....ver.vip application ONLINE ONLINE rac1-server
ora....SM2.asm application ONLINE ONLINE rac2-server
ora....ER.lsnr application ONLINE ONLINE rac2-server
ora....ver.gsd application ONLINE ONLINE rac2-server
ora....ver.ons application ONLINE ONLINE rac2-server
ora....ver.vip application ONLINE ONLINE rac2-server

3.3 根据MOS文档思路,将数据库启动到mount

[oracle@rac1-server crsd]$ srvctl start database -d jy -o mount;
[oracle@rac1-server crsd]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.jy.db application ONLINE ONLINE rac1-server
ora....y1.inst application ONLINE ONLINE rac1-server
ora....y2.inst application ONLINE ONLINE rac2-server
ora....SM1.asm application ONLINE ONLINE rac1-server
ora....ER.lsnr application ONLINE ONLINE rac1-server
ora....ver.gsd application ONLINE ONLINE rac1-server
ora....ver.ons application ONLINE ONLINE rac1-server
ora....ver.vip application ONLINE ONLINE rac1-server
ora....SM2.asm application ONLINE ONLINE rac2-server
ora....ER.lsnr application ONLINE ONLINE rac2-server
ora....ver.gsd application ONLINE ONLINE rac2-server
ora....ver.ons application ONLINE ONLINE rac2-server
ora....ver.vip application ONLINE ONLINE rac2-server

3.4 尝试在mount下recover database

[oracle@rac1-server crsd]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Mon Aug 14 22:43:03 2017

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options SQL> recover database;
Media recovery complete.
SQL> alter database open; Database altered. SQL>

最终成功recover并打开数据库。

3.5 节点2也将数据库open

节点2也将数据库open:

[oracle@rac2-server ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Mon Aug 14 22:45:17 2017

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options SQL> select open_mode from v$database; OPEN_MODE
----------
MOUNTED SQL> alter database open; Database altered. SQL>

至此,这套10g RAC的数据库实验环境恢复正常。

案例:数据库open时报错ORA-1172,ORA-1151 处理的更多相关文章

  1. mysql数据库导出时报错mysqldump: Got error: 145的解决方法

      在给mysql数据库备份时,报错:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed ...

  2. 用PL/SQL工具连接Oracle数据库的时报错:ORA-12638: 身份证明检索失败的解决方法

    本地客户端用PLSQL Developer连接远程数据库时提示: ORA-12638: 身份证明检索失败!!! 解决方法一: 此目录下F:\myorcl\product\11.2.0\client_1 ...

  3. navicat导入mysql数据库sql时报错

    今天运维的一个项目需要进入数据库修改下数据,MYSQL的数据库,我先导出了一份数据结构和数据,然后进行修改,改完后发现项目报错了...粗心大意哪改错了,赶紧恢复数据库,结果导入SQL时报错了,当时心凉 ...

  4. Django在根据models生成数据库表时报错: __init__() missing 1 required positional argument: 'on_delete'

    原因: 在django2.0后,定义外键和一对一关系的时候需要加on_delete选项,此参数为了避免两个表里的数据不一致问题,不然会报错:TypeError: __init__() missing ...

  5. Django在根据models生成数据库表时报错

    报错信息: E:\Python\s6day103>python manage.py makemigrations Traceback (most recent call last): File ...

  6. django数据库同步时报错“Table 'XXX' already exists”

    转自:http://blog.csdn.net/huanhuanq1209/article/details/77884014 执行manage.py makemigrations 未提示错误信息, 但 ...

  7. 连接linux数据库Oracle时报错ORA-12541: TNS: 无监听程序

    远程服务器的数据库服务未开启,以及监听未打开 连接oracle 启动服务,startup 切换到oracle /bin 目录,cd $ORACLE_HOME/bin 启动监听, lsnrctl sta ...

  8. navicat导入mysql数据库sql时报错或数据不完全问题

    错误详情:[Err] [Imp] 2006 - MySQL server has gone away 或无提示错误,但是导入数据明显缺少字段和数据 找到服务器上的MYSQL安装目录下的my.ini文件 ...

  9. 【python3】 django2.0 在生成数据库表时报错: TypeError: __init__() missing 1 required positional argument: 'on_delete'

    python: 3.6.4 django: 2.0 models.py 代码如下 # coding: utf-8 from django.db import models from django.co ...

随机推荐

  1. [leetcode-625-Minimum Factorization]

    Given a positive integer a, find the smallest positive integer b whose multiplication of each digit ...

  2. 青出于蓝而胜于蓝 — Vue.js对Angular.js的那些进步

    Angular.js与Vue.js是非常有渊源的两款前端框架,据Vue.js的官方网站描述,在其早期开发时,灵感来源就是Angular.js.而在很多方面,Vue.js也正像是中国的那句古话,&quo ...

  3. iOS- 解决iOS10 App启动时放大铺满App Icon的问题

    0.前言 iOS10 App启动时放大铺满App图标 iPad Application shows app icon as launch screen in iOS 10 如图,点击APP后APP图标 ...

  4. Linux系统介绍

    类似Windows, Linux也是一个操作系统,Linux是一套开放源代码程序,并可以自由传播的类Unix操作系统软件,多用户,多任务并且支持多线程和多CPU的操作系统. Linux系统主要被应用于 ...

  5. AutoMapper 6.x 扩展

    简介 很多时候我们使用AutoMapper的时候,都需要进行一个配置才可以使用Mapper.Map<Source,Target>(entity);.如果不进行配置则会报错. 如果实体过多, ...

  6. 二、redis集群搭建

    redis集群搭建 redis3.0后支持集群.集群中应该至少有三个节点,每个节点有一备份节点.需要6台服务器.搭建伪分布式,需要6个redis实例.搭建集群的步骤: 一.安装单机版redis 第一步 ...

  7. Makefile学习总结

    Makefile用法分析     在linux开发中,应用程序的编译基本都采用GNU的make工具,而make搭配Makefile来实现工程代码的编译,在越是大型复杂的项目中,make的强悍之处越是明 ...

  8. var与let的区别

    var与let的区别 前言: 在没接触Es6之前,我们在js中声明都是通过var来声明变量的,var声明变量虽说方便,但是,又有一些自己的诟病,下边来说一说,这三个的区别! var var相信大家都不 ...

  9. 如何将notMNIST转成MNIST格式

    相信了解机器学习的对MNIST不会陌生,Google的工程师Yaroslav Bulatov 创建了notMNIST,它和MNIST类似,图像28x28,也有10个Label(A-J). 在Tenso ...

  10. Unrooted Tests错误

    使用Junit4做测试,遇到如下问题: 条件如下: Eclipse里的Maven工程. 使用JUnit4(这个是否必须不知,反正我的工程用的4) 修改某个Test类里的方法名,或者增加一个Test方法 ...