上一篇文章中我们了解到,接下来,我们看看oracle数据库ORA-01196错误解决的相关内容,具体如下:
问题现象
在使用shutdown abort停DataGuard备库后,备库不能open,报ORA-01196错误。
发现一备库不能应用日志,查看备库日志没发现报错,怀疑是备库应用日志服务停止,于是尝试重启备库;
可能因为备库是读业务比较繁忙,在shutdown immediate关闭备库时等时间过长,于是使用了shutdown abort命令;
但后面在启动备库时发生报错,造成数据文件损坏,控制文件和数据文件的scn号不一致。
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'
--查看日志
解决办法:
把备库闪回到正常的状态的时点。
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
--查看日志看到日志已经从闪回的时点开始应用
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
总结
以上就是本文关于oracle数据库ORA-01196错误解决办法分享的全部内容,希望对大家有所帮助。感兴趣的朋友可以继续参阅本站:ORACLE SQL语句优化技术要点解析、、等,有什么问题可以直接留言,小编会及时回复大家的。感谢朋友们对本站的支持!这里推荐几本oracle相关的书籍,供广大编程爱好及工作者学习、参考。
构建Oracle高可用环境 (陈吉平) 中文pdf扫描版
oracle中文手册合集 CHM版
希望大家能够喜欢!
原文链接:https://www.f2er.com/oracle/64751.html