案例:数据库open时报错ORA-1172,ORA-1151 处理
环境: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 处理的更多相关文章
- mysql数据库导出时报错mysqldump: Got error: 145的解决方法
在给mysql数据库备份时,报错:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed ...
- 用PL/SQL工具连接Oracle数据库的时报错:ORA-12638: 身份证明检索失败的解决方法
本地客户端用PLSQL Developer连接远程数据库时提示: ORA-12638: 身份证明检索失败!!! 解决方法一: 此目录下F:\myorcl\product\11.2.0\client_1 ...
- navicat导入mysql数据库sql时报错
今天运维的一个项目需要进入数据库修改下数据,MYSQL的数据库,我先导出了一份数据结构和数据,然后进行修改,改完后发现项目报错了...粗心大意哪改错了,赶紧恢复数据库,结果导入SQL时报错了,当时心凉 ...
- Django在根据models生成数据库表时报错: __init__() missing 1 required positional argument: 'on_delete'
原因: 在django2.0后,定义外键和一对一关系的时候需要加on_delete选项,此参数为了避免两个表里的数据不一致问题,不然会报错:TypeError: __init__() missing ...
- Django在根据models生成数据库表时报错
报错信息: E:\Python\s6day103>python manage.py makemigrations Traceback (most recent call last): File ...
- django数据库同步时报错“Table 'XXX' already exists”
转自:http://blog.csdn.net/huanhuanq1209/article/details/77884014 执行manage.py makemigrations 未提示错误信息, 但 ...
- 连接linux数据库Oracle时报错ORA-12541: TNS: 无监听程序
远程服务器的数据库服务未开启,以及监听未打开 连接oracle 启动服务,startup 切换到oracle /bin 目录,cd $ORACLE_HOME/bin 启动监听, lsnrctl sta ...
- navicat导入mysql数据库sql时报错或数据不完全问题
错误详情:[Err] [Imp] 2006 - MySQL server has gone away 或无提示错误,但是导入数据明显缺少字段和数据 找到服务器上的MYSQL安装目录下的my.ini文件 ...
- 【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 ...
随机推荐
- 【Android Developers Training】 19. 序言:通过Fragments构建动态UI
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
- 【Android Developers Training】 28. 将用户带领到另一个应用
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
- Vulkan Tutorial 25 Images
操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 Introduction 到目前为止,几何图形使用每个顶点颜色进行着色处理,这是一个 ...
- NewsServiceImpl
package com.pb.news.service.impl; import java.util.List; import com.pb.news.dao.NewsDao;import com.p ...
- usaco training 4.1.3 fence6 题解
Fence Loops题解 The fences that surround Farmer Brown's collection of pastures have gotten out of cont ...
- 30分钟学会使用Spring Web Services基础开发
时隔一年终于又推出了一篇30分钟系列,上一篇<30分钟学会反向Ajax>是2016年7月的事情了.时光荏苒,岁月穿梭.虽然一直还在从事Java方面的开发工作,但是私下其实更喜欢使用C++. ...
- 华为OJ之放砝码
题目描述: 现有一组砝码,重量互不相等,分别为m1.m2--mn:他们可取的最大数量分别为x1.x2--xn.现在要用这些砝码去称物体的重量,问能称出多少中不同的重量. 注: 称重重量包括0: 要对输 ...
- SLAM中的优化理论(一)—— 线性最小二乘
最近想写一篇系列博客比较系统的解释一下 SLAM 中运用到的优化理论相关内容,包括线性最小二乘.非线性最小二乘.最小二乘工具的使用.最大似然与最小二 乘的关系以及矩阵的稀疏性等内容.一方面是督促自己对 ...
- (转)Spring的单例模式底层实现
单例模式也属于创建型模式,所谓单例,顾名思义,所指的就是单个实例,也就是说要保证一个类仅有一个实例. 单例模式有以下的特点: ① 单例类只能有一个实例 ② 单例类必须自己创建自己的唯一实例 ③ 单例类 ...
- 有关struts中DispatchAction的用法小结
今天刚刚看了DispatchAction觉得这个东西有点意思,所以就写点东西,通过它的名字我想应该可以明白它的作用了,用于分发的Action,主要的好处是把一些功能类似的Action放到一个Ac ...