环境: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-438-Find All Anagrams in a String]

    Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.Strings c ...

  2. iOS 本地视频和网络视频流播放

    需求:最近公司需要做一个楼宇对讲的功能:门口机(连接WIFI)拨号对室内机(对应的WIFI)的设备进行呼叫,室内机收到呼叫之后将对收到的数据进行UDP广播的转发,手机(连接对应的WIFI)收到视频流之 ...

  3. Java基础(7)-异常处理

    异常处理 异常继承层次 Throwable |-Error 致命的错误无法处理 |-Exception |-IOException 系统资源读取失败等错误 |-RuntimeException(未检异 ...

  4. OJ2237第k小数题解

    题目描述: 有n个数,请你找出第k小的数. 输入描述: 第一行有2个正整数n,k(n,k<=10^7)第二行有n个非负数ai(ai<=10^5) 输出描述: 输出第k小的数. 输入样例: ...

  5. mysql性能监控工具

    参考文档: http://www.linuxidc.com/Linux/2012-09/70459.htm 1.记录慢查询SQL #配置开启 (linux)修改my.cnf: log-slow-que ...

  6. User implements HttpSessionBindingListener

    public class User implements HttpSessionBindingListener { private int id; private String userName; p ...

  7. 读书共享 Primer Plus C-part 8

    第十三章 文件输入/输出 fopen--fclose fopen 是文件的操作的开始 fclose是文件操作的结束 getc--putc getchar--putchar getc对应文件的获取单个字 ...

  8. P1280 尼克的任务

    题目描述 尼克每天上班之前都连接上英特网,接收他的上司发来的邮件,这些邮件包含了尼克主管的部门当天要完成的全部任务,每个任务由一个开始时刻与一个持续时间构成. 尼克的一个工作日为N分钟,从第一分钟开始 ...

  9. org.apache.jasper.JasperException: - Page directive must not have multiple occurrences of pageencoding

    最近写jsp遇到一系列的低级错误,记录下来权当前车之鉴吧. 错误提示: SEVERE: Servlet.service() for servlet jsp threw exceptionorg.apa ...

  10. Java负载均衡-輪詢法

    import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Set; /* ...