DataGuard备库ORA-01196故障恢复一则
问题现象
在使用shutdown abort停DataGuard备库后。备库不能open,报ORA-01196错误。
详细例如以下:
发现一备库不能应用日志。查看备库日志没发现报错。怀疑是备库应用日志服务停止,于是尝试重新启动备库。
可能由于备库是读业务比較繁忙,在shutdown immediate关闭备库时等时间过长,于是使用了shutdown abort命令;
但后面在启动备库时发生报错,造成数据文件损坏,控制文件和数据文件的scn号不一致。
--启动备库时报错
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 2.0310E+10 bytes
Fixed Size 2235256 bytes
Variable Size 9328133256 bytes
Database Buffers 1.0939E+10 bytes
Redo Buffers 40894464 bytes
数据库装载完成。
ORA-10458: standby database requiresrecovery
ORA-01196: 文件 1 因为介质恢复会话失败而不一致
ORA-01110: 数据文件 1:'+DATA/htdb5/datafile/system.261.759082693'
--查看日志
alter database open
Data Guard Brokerinitializing...
Data Guard Brokerinitialization complete
Beginning standby crash recovery.
Serial Media Recovery started
Managed Standby Recoverystarting Real Time Apply
Media Recovery Log+FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180068.1541.885192077
Thu Jul 16 12:00:47 2015
Errors in file/u01/app/ora11g/diag/rdbms/htdb5/htdb5/trace/htdb5_ora_10154.trc:
ORA-01013: 用户请求取消当前的操作
ORA-10567: Redo is inconsistentwith data block (file# 47, block# 1187724, file offset is 1139900416 bytes)
ORA-10564: tablespace JDYWP_IDX
ORA-01110: 数据文件 47:'+DATA/htdb5/datafile/jdywp_idx.336.856967805'
ORA-10561: block type'TRANSACTION MANAGED INDEX BLOCK', data object# 251837
Errors in file/u01/app/ora11g/diag/rdbms/htdb5/htdb5/trace/htdb5_ora_10154.trc:
ORA-00339: 归档日志未包括不论什么重做
ORA-00334: 归档日志: '+DATA/htdb5/onlinelog/group_2.280.759082845'
ORA-10567: Redo is inconsistentwith data block (file# 47, block# 1187724, file offset is 1139900416 bytes)
ORA-10564: tablespace JDYWP_IDX
ORA-01110: 数据文件 47:'+DATA/htdb5/datafile/jdywp_idx.336.856967805'
ORA-10561: block type'TRANSACTION MANAGED INDEX BLOCK', data object# 251837
Errors in file/u01/app/ora11g/diag/rdbms/htdb5/htdb5/trace/htdb5_ora_10154.trc (incident=116743):
ORA-00600: 内部错误代码, 參数: [3020],[47], [1187724], [198320012], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistentwith data block (file# 47, block# 1187724, file offset is 1139900416 bytes)
ORA-10564: tablespace JDYWP_IDX
ORA-01110: 数据文件 47:'+DATA/htdb5/datafile/jdywp_idx.336.856967805'
ORA-10561: block type'TRANSACTION MANAGED INDEX BLOCK', data object# 251837
Incident details in:/u01/app/ora11g/diag/rdbms/htdb5/htdb5/incident/incdir_116743/htdb5_ora_10154_i116743.trc
Use ADRCI or Support Workbenchto package the incident.
See Note 411.1 at My OracleSupport for error and packaging details.
Standby crash recovery aborteddue to error 600.
Errors in file/u01/app/ora11g/diag/rdbms/htdb5/htdb5/trace/htdb5_ora_10154.trc:
ORA-00600: 内部错误代码, 參数: [3020],[47], [1187724], [198320012], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistentwith data block (file# 47, block# 1187724, file offset is 1139900416 bytes)
ORA-10564: tablespace JDYWP_IDX
ORA-01110: 数据文件 47:'+DATA/htdb5/datafile/jdywp_idx.336.856967805'
ORA-10561: block type'TRANSACTION MANAGED INDEX BLOCK', data object# 251837
Recovery interrupted!
Some recovered datafiles maybeleft media fuzzy
Media recovery may continue butopen resetlogs may fail
Completed standby crashrecovery.
Errors in file/u01/app/ora11g/diag/rdbms/htdb5/htdb5/trace/htdb5_ora_10154.trc:
ORA-10458: standby databaserequires recovery
ORA-01196: 文件 1 因为介质恢复会话失败而不一致
ORA-01110: 数据文件 1:'+DATA/htdb5/datafile/system.261.759082693'
ORA-10458 signalled during:alter database open...
Thu Jul 16 12:00:49 2015
Sweep [inc][116743]: completed
Sweep [inc2][116743]: completed
Thu Jul 16 12:00:49 2015
Dumping diagnostic data indirectory=[cdmp_20150716120049], requested by (instance=1, osid=10154),summary=[incident=116743].
Thu Jul 16 12:01:50 2015
解决的方法:
把备库闪回到正常的状态的时点。
--前提数据库闪回之前已经打开
SQL> select FLASHBACK_ON from v$database;
FLASHBACK_ON
------------------
YES
SQL> Flashback database to timestamp to_timestamp('2015-07-16 4:00:05','yyyy-mm-ddhh24:mi:ss');
--或是使用Flashbackdatabase to scn 947921
SQL> alter database open;
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY
--启动实时应用
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
--查看日志看到日志已经从闪回的时点開始应用
Thu Jul 16 13:36:01 2015
Flashback database to timestampto_timestamp('2015-07-16 4:00:05','yyyy-mm-dd hh24:mi:ss')
Flashback Restore Start
Thu Jul 16 13:39:30 2015
Flashback Restore Complete
Flashback Media Recovery Start
started logmerger process
Parallel Media Recovery startedwith 16 slaves
Flashback Media Recovery Log+FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180047.2212.885180637
Thu Jul 16 13:41:54 2015
Flashback Media Recovery Log+FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180061.2611.885182343
Thu Jul 16 13:42:04 2015
Flashback Media Recovery Log+FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180062.2861.885182537
Thu Jul 16 13:42:12 2015
Incomplete Recovery applieduntil change 71489772016 time 07/16/2015 04:00:06
Flashback Media RecoveryComplete
Completed: Flashback databaseto timestamp to_timestamp('2015-07-16 4:00:05','yyyy-mm-dd hh24:mi:ss')
Thu Jul 16 13:43:25 2015
Deleted Oracle managed file+FRA/htdb5/archivelog/2015_07_15/thread_1_seq_179690.2885.885083087
Thu Jul 16 13:43:25 2015
Standby controlfile consistentwith primary
RFS[3]: Selected log 8 forthread 1 sequence 180122 dbid 1083719948 branch 759079182
Archived Log entry 180115 addedfor thread 1 sequence 180121 ID 0x40a48484 dest 1:
Thu Jul 16 13:45:41 2015
alter database open
Data Guard Brokerinitializing...
Data Guard Brokerinitialization complete
SMON: enabling cache recovery
Dictionary check beginning
Dictionary check complete
Database Characterset isZHS16GBK
No Resource Manager plan active
replication_dependency_trackingturned off (no async multimaster replication found)
Physical standby databaseopened for read only access.
Completed: alter database open
Thu Jul 16 13:45:44 2015
ALTER DATABASE RECOVER MANAGEDSTANDBY DATABASE THROUGH ALL SWITCHOVERDISCONNECT USING CURRENT LOGFILE
Attempt to start backgroundManaged Standby Recovery process (htdb5)
Thu Jul 16 13:45:44 2015
MRP0 started with pid=51, OSid=14743
MRP0: Background ManagedStandby Recovery process started (htdb5)
started logmerger process
Thu Jul 16 13:45:50 2015
Managed Standby Recoverystarting Real Time Apply
Parallel Media Recovery startedwith 16 slaves
Waiting for all non-currentORLs to be archived...
All non-current ORLs have beenarchived.
Media Recovery Log +FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180062.2861.885182537
Completed: ALTER DATABASERECOVER MANAGED STANDBY DATABASE THROUGHALL SWITCHOVER DISCONNECT USING CURRENTLOGFILE
Thu Jul 16 13:46:08 2015
Media Recovery Log+FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180063.3683.885182777
Thu Jul 16 13:46:35 2015
Media Recovery Log+FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180064.2542.885183119
Thu Jul 16 13:47:07 2015
Media Recovery Log+FRA/htdb5/archivelog/2015_07_16/thread_1_seq_180065.2717.885183615
DataGuard备库ORA-01196故障恢复一则的更多相关文章
- Oracle数据库由dataguard备库引起的log file sync等待
导读: 最近数据库经常出现会话阻塞的报警,过一会又会自动消失,昨天晚上恰好发生了一次,于是赶紧进行了查看,不看不知道,一看吓一跳,发现是由dataguard引起的log file sync等待.我们知 ...
- oracle11g dataguard 备库数据同步的检查方法
概述: 一.环境 主库: ip地址:192.168.122.203 oracle根目录:/data/db/oracle SID:qyq 数据文 ...
- Oracle 11.2.4.0 ACTIVE DATAGUARD 单实例安装(COPY创建备库)
Oracle 11.2.4.0 ADG 单实例安装(COPY创建备库) 规划: 主: OS: Linux Centos 6.5 X64 hostname:ORA11G-DG1 ipaddress:19 ...
- dataguard 归档丢失(主库中无此丢失归档处理),备库基于SCN恢复
dataguard 归档丢失(主库中无此丢失归档处理),备库基于SCN恢复 环境: OS: CentOS 6.5 DB: Oracle 10.2.0.5 1.主备库环境 主库: SQL> sel ...
- DATAGUARD 在线重建备库
环境: OS: CentOS 6.5 X64 DB: oracle 10.2.0.5 故障:之前由于错误激活备库主写导致主备日志同步,重建备库 1.关闭备库,删除数据文件及控制文件,redo文件 rm ...
- dataGuard主备库角色切换
切换顺序: 先主库后备库 --查看主库可切换状态: SQL> select switchover_status from v$database; SWITCHOVER_STATUS ------ ...
- DataGuard切换(主库为Rac+备库为Rac)
http://blog.itpub.net/29477587/viewspace-1331121/ 前段时间做了一次主备库的切换,大体写下操作步骤和记录,分享下. 环境: db v ...
- OGG 从Oracle备库同步数据至kafka
OGG 从Oracle备库同步数据至kafka Table of Contents 1. 目的 2. 环境及规划 3. 安装配置JDK 3.1. 安装jdk 3.2. 配置环境变量 4. 安装Data ...
- Oracle备库TNS连接失败的分析
今天在测试12c的temp_undo的时候,准备在备库上测试一下,突然发现备库使用TNS连接竟然失败. 抛出的错误如下: $ sqlplus sys/oracle@testdb as sysdba S ...
随机推荐
- Mac VMware fusion nat 外网映射
当我们在使用VMware fusion NAT模式时,相当于形成了一个虚拟的局域网VLAN,这时虚拟机可以对外通信,但是nat对外隐藏了内网,外网访问虚拟机的时候就会遇到问题,比如ping ,ssh ...
- AWK原理及命令和文件输入
一.awk简介 1.awk是3个姓氏的首字母,代表该语言的3个作者,awk的版本有很多,包括:旧版awk,新版awk(nawk),GNU awk(gawk)等. awk程序有awk命令,括在引 ...
- js中取绝对值的2种方法!
1.abs() var aaa=-20; var bbb=Math.abs(aaa); 2.加减法 var aaa=-20; var bbb=-aaa
- PTA 10-排序4 统计工龄 (20分)
题目地址 https://pta.patest.cn/pta/test/15/exam/4/question/721 5-13 统计工龄 (20分) 给定公司NN名员工的工龄,要求按工龄增序输出每 ...
- gitlab简介配置和参数修改
一.Gitlab基本简介 GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,可通过Web界面进行访问公开的或者私人项目,非常适合在团队内部使用. 在gitlab中有三个版本, ...
- Dialog共通写法(两个button)
package jp.co.hyakujushibank.view import android.app.Dialogimport android.content.Contextimport andr ...
- Python之虚拟机操作:利用VIX二次开发,实现自己的pyvix(系列一)成果展示和python实例
在日常工作中,需要使用python脚本去自动化控制VMware虚拟机,现有的pyvix功能较少,而且不适合个人编程习惯,故萌发了开发一个berlin版本pyvix的想法,暂且叫其OpenPyVix.O ...
- PAT天梯赛练习题——L3-007. 天梯地图(多边权SPFA)
L3-007. 天梯地图 时间限制 300 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 本题要求你实现一个天梯赛专属在线地图,队员输入自己学校 ...
- 干货 | Elasticsearch Nested类型深入详解
在Elasticsearch实战场景中,我们或多或少会遇到嵌套文档的组合形式,反映在ES中称为父子文档. 父子文档的实现,至少包含以下两种方式: 1)父子文档 父子文档在5.X版本中通过parent- ...
- 简单的webservice发布和测试
eclipse发布参考:http://www.cnblogs.com/cherxu/p/5179053.html很简单,接口写好后,打个war包放到tomcat里面跑起来: 本例采用axis来测试:发 ...