暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle数据库频繁重启故障处理

IT那活儿 2022-02-26
787

点击上方“IT那活儿”,关注后了解更多内容,不管IT什么活儿,干就完了!!!


近期,收到客户反馈一套Oracle 12.1版本单实例环境数据库重新启动后,实例自动关闭无法拉起。

经与客户沟通,该数据库核心数据文件均存放在NAS盘中,因NAS盘硬件故障导致数据库实例无法连接到NAS存储,待硬件工程师修复NAS盘硬件故障后连接恢复正常,但数据库实例无法正常拉起。



01


故障分析


1.1 客户数据库预警日志文件显示
<msg time='2022-01-15T17:37:25.255+08:00' org_id='oracle' comp_id='rdbms'type='UNKNOWN' level='16' host_id='localhost.localdomain'host_addr='::1' pid='53213'><txt>ORACLE Instance xxxxx (pid = 25) - Error 607 encountered while recovering transaction (37, 8) on object 5341044.</txt></msg><msg time='2022-01-15T17:37:25.255+08:00' org_id='oracle' comp_id='rdbms'type='UNKNOWN' level='16' host_id='localhost.localdomain'host_addr='::1' pid='53213'><txt>Errors in file /u01/app/oracle/diag/rdbms/xxxxx/xxxxx/trace/xxxxx_smon_53213.trc:ORA-00607: Internal error occurred while making a change to a data blockORA-00600: internal error code, arguments: [6856], [0], [0], [], [], [], [], [], [], [], [], []</txt></msg>……<msg time='2022-01-15T17:37:34.483+08:00' org_id='oracle' comp_id='rdbms'type='UNKNOWN' level='16' host_id='localhost.localdomain'host_addr='::1' pid='53165'><txt>Instance Critical Process (pid: 25, ospid: 53213, SMON) died unexpectedly</txt></msg><msg time='2022-01-15T17:37:34.526+08:00' org_id='oracle' comp_id='rdbms'type='UNKNOWN' level='16' host_id='localhost.localdomain'host_addr='::1' pid='53165'><txt>PMON (ospid: 53165): terminating the instance due to error 474</txt></msg>……
复制
1.2 预警日志显示结果
数据库实例在恢复5341044对象的事务时异常,导致SMON进程退出。


02

处理过程


根据预警文件错误提示,查询相关资料:
ORA-600 [6006] ORA-600 [6856] During Startup Instance, Followed by Termination by SMON (Doc ID 549000.1)
复制
2.1 生成pfile文件,并添加禁止smon恢复事务的event。
create pfile=’/tmp/pfile01.ora’ from spfile;echo '*.event="10513 trace name context forever, level 2"' >> /tmp/pfile01.ora
复制
2.2 用修改后的pfile拉起实例,确认smon恢复事务的对象。
startup pfile=’/tmp/pfile01.ora’;select object_id, data_object_id, owner, object_name from dba_objects where object_id = 5341044 or data_object_id=5341044 ;
复制
2.3 删除对象,清空回收站经客户确认,对象为5341044的表数据从其他库中抽取了,此表可以删除。
drop table xxxxx;purge dba_recyclebin;
复制
2.4 关闭数据库用原pfile文件起动数据库。
#关闭数据库shutdown immediate;pfile01.ora文件中去掉10513 event# 起动数据库startup pfile=’/tmp/pfile01.ora’;# 检查数据库select open_mode from v$database;select * from v$recover_file;#切换日志,查看预警日志中是否有报错信息alter system switch logfile;#重建删除的对象
复制



03

总  结


核心数据库一般不建议通过挂载NAS方式存放数据文件,因为涉及网络带宽影响数据库性能同时也存在一定的安全风险。
建议:
  • 将数据库数据文件从nas盘移出,放到服务器存储中。
  • 升级数据库从12.1版本升级到19c稳定版本,减少bug的发生。


本文作者:徐利强

本文来源:IT那活儿(上海新炬王翦团队)

文章转载自IT那活儿,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论