Java自学者论坛

 找回密码
 立即注册

手机号码,快捷登录

恭喜Java自学者论坛(https://www.javazxz.com)已经为数万Java学习者服务超过8年了!积累会员资料超过10000G+
成为本站VIP会员,下载本站10000G+会员资源,会员资料板块,购买链接:点击进入购买VIP会员

JAVA高级面试进阶训练营视频教程

Java架构师系统进阶VIP课程

分布式高可用全栈开发微服务教程Go语言视频零基础入门到精通Java架构师3期(课件+源码)
Java开发全终端实战租房项目视频教程SpringBoot2.X入门到高级使用教程大数据培训第六期全套视频教程深度学习(CNN RNN GAN)算法原理Java亿级流量电商系统视频教程
互联网架构师视频教程年薪50万Spark2.0从入门到精通年薪50万!人工智能学习路线教程年薪50万大数据入门到精通学习路线年薪50万机器学习入门到精通教程
仿小米商城类app和小程序视频教程深度学习数据分析基础到实战最新黑马javaEE2.1就业课程从 0到JVM实战高手教程MySQL入门到精通教程
查看: 657|回复: 0

oracle数据库的一次异常起停处理。

[复制链接]
  • TA的每日心情
    奋斗
    2024-11-24 15:47
  • 签到天数: 804 天

    [LV.10]以坛为家III

    2053

    主题

    2111

    帖子

    72万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    726782
    发表于 2021-7-22 17:48:27 | 显示全部楼层 |阅读模式

    在重启数据库的时候,忘记把一个应用关停了,想起来的时候,就ctrl+c,把数据库shutdown immediate 给强制停下了,把该应用再停止,然后shutdown immdiate,这时候数据报错了。

    oracle@NMSSERVER1:~> sqlplus '/as sysdba'

    SQL*Plus: Release 11.2.0.3.0 Production on Tue May 3 18:07:35 2016

    Copyright (c) 1982, 2011, Oracle. All rights reserved.


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    SQL> shutdown immediate;
    ^C^C^C^C^C

    ^C^C^C^C


    ORA-12152: TNS:unable to send break message

     

    SQL> SQL> SQL> SQL>
    SQL> shutdown immediate;
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    SQL>
    SQL>
    SQL>
    SQL> shutdown immediate;
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    SQL>
    SQL>
    SQL> startup force;
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    SQL> shutdown immediate;
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    SQL>

     

     

     

    此时alert日志的情况如下:

    Additional information: 1
    Additional information: 32823
    Tue May 03 18:05:16 2016
    Errors in file /opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/trace/pm4h_m000_21073.trc:
    ORA-51106: check failed to complete due to an error. See error below
    ORA-48101: error encountered when attempting to read a file [block] [/opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/metadata/HM_FINDING.ams] [0]
    ORA-48102: encountered the end-of-file when reading the file
    Additional information: 64840
    Additional information: 1
    Additional information: 32823
    Tue May 03 18:06:45 2016
    Errors in file /opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/trace/pm4h_m000_25185.trc:
    ORA-51106: check failed to complete due to an error. See error below
    ORA-48101: error encountered when attempting to read a file [block] [/opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/metadata/HM_FINDING.ams] [0]
    ORA-48102: encountered the end-of-file when reading the file
    Additional information: 64840
    Additional information: 1
    Additional information: 32823
    Tue May 03 18:07:25 2016
    opidcl aborting process unknown ospid (58374) as a result of ORA-2396
    Tue May 03 18:07:26 2016


    ***********************************************************************

    Fatal NI connect error 12547, connecting to:
    (LOCAL=NO)

    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.3.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    Time: 03-MAY-2016 18:07:26
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12547

    TNS-12547: TNS:lost contact
    ns secondary err code: 12560
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    opiodr aborting process unknown ospid (29320) as a result of ORA-609
    Tue May 03 18:07:29 2016
    opidcl aborting process unknown ospid (58149) as a result of ORA-2396
    Tue May 03 18:07:44 2016
    Errors in file /opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/trace/pm4h_m000_29720.trc:
    ORA-51106: check failed to complete due to an error. See error below
    ORA-48101: error encountered when attempting to read a file [block] [/opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/metadata/HM_FINDING.ams] [0]
    ORA-48102: encountered the end-of-file when reading the file
    Additional information: 64840
    Additional information: 1
    Additional information: 32823
    Tue May 03 18:08:50 2016
    Errors in file /opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/trace/pm4h_m000_31031.trc:
    ORA-51106: check failed to complete due to an error. See error below
    ORA-48101: error encountered when attempting to read a file [block] [/opt/oracle/app/oracle/diag/rdbms/pm4h/pm4h/metadata/HM_FINDING.ams] [0]
    ORA-48102: encountered the end-of-file when reading the file
    Additional information: 64840
    Additional information: 1
    Additional information: 32823
    Tue May 03 18:10:03 2016
    Shutting down instance (immediate)
    Stopping background process SMCO
    Shutting down instance: further logons disabled
    Stopping background process QMNC
    Tue May 03 18:10:05 2016
    Stopping background process CJQ0
    Stopping background process MMNL
    Stopping background process MMON
    License high water mark = 1426
    Tue May 03 18:11:17 2016
    ALTER DATABASE CLOSE NORMAL
    Tue May 03 18:11:21 2016
    SMON: disabling tx recovery
    SMON: disabling cache recovery
    ^C

     

     

     

     

    处理的措施:

    1.查看共享内存资源
     ipcs -pmb

     

    oracle@NMSSERVER1:~> ipcs -pm;

    ------ Shared Memory Creator/Last-op PIDs --------
    shmid owner cpid lpid
    3145744 oracle 14924 32669
    3178513 oracle 14924 32669
    3211282 oracle 14924 32669
    3244051 oracle 14924 32669
    3276820 oracle 14924 32669
    3309589 oracle 14924 32669
    3342358 oracle 14924 32669
    3375127 oracle 14924 32669
    3407896 oracle 14924 32669
    3440665 oracle 14924 32733

    oracle资源在占用,所以必须进行资源释放,执行如下操作:

    oracle@NMSSERVER1:~> ipcrm -m 3145744

    (这里必须一个一个的停,不能一次停 多个)

    2.


    SQL> shutdown immediate;
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    SQL> startup force;
    ORACLE instance started.

    Total System Global Area 5.1310E+10 bytes
    Fixed Size 2240344 bytes
    Variable Size 3.1139E+10 bytes
    Database Buffers 2.0133E+10 bytes
    Redo Buffers 36098048 bytes
    Database mounted.
    Database opened.

    哎...今天够累的,签到来了1...
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|手机版|小黑屋|Java自学者论坛 ( 声明:本站文章及资料整理自互联网,用于Java自学者交流学习使用,对资料版权不负任何法律责任,若有侵权请及时联系客服屏蔽删除 )

    GMT+8, 2024-12-22 13:31 , Processed in 0.051904 second(s), 27 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表