问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

数据库异常停止,不知道是什么原因

发布网友 发布时间:2022-04-08 23:04

我来回答

3个回答

懂视网 时间:2022-04-09 03:25

在重启数据库的时候,忘记把一个应用关停了,想起来的时候,就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.

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

标签:

热心网友 时间:2022-04-09 00:33

1,首先排除设置了正确的SID连接
如:C:\Users\Administrator>set ORACLE_SID = orcl //确定本机数据库实例名
linux下用export ORACLE_SID=orcl

2,以sysdba连接,关闭数据库

sqlplus / as sysdba
shutdown immediate
如果不能关闭,windows下杀掉oracle进程,停掉oracle的服务
linux下:ps -ef|grep smon找到对应的pid
kill -9 <pid>

3,重新启动试试
startup
如果还是不行,查看报错原因,这里可能有很多,比如数据文件错误

4.这里假如你的错误是数据文件引起

shutdown immediate

startup mount
recover datafile <datafile number>;
alter database open;
就可以了

如果不是数据文件错误,贴出来看看吧

热心网友 时间:2022-04-09 01:51

解决方法你详细看看。我也不好叫你侧这个测那个,
用户认证失败,SQLServer认为连接使用了一个非法用户而拒绝:
Login failed for user “Null”
“消息 18456,级别 14,状态 1,服务器 <computer_name>,第1行”
“用户‘<user_name>’ 登录失败
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
女生多大后可以不在长身高? 如何不用软件把手机投屏到电脑上手机屏幕怎样投放到电脑上 战时拒绝、故意延误军事订货罪既遂的处罚? 战时故意延误军事订货罪处罚标准 名师1+1导读方案:汤姆·索亚历险记目录 三星sm-g7200打开微信慢,无法正常收看,网速不慢。 笔记本电脑如何调亮屏幕亮度 大伙说说洗衣机要不要带烘干好 热烘干洗衣机怎么样 ef英语哪个好 文具店牌匾设计图 求解梦:昨晚做梦梦到像蚯蚓一样的虫子,比蚯蚓要小,从手上钻到身体里面... 幼儿园设有神坛是怎么回事? 我做梦梦见很多长长的虫子(像蚯蚓一样的)钻进我的身体(脚指头,手 幼儿园置换货的小牌匾怎么做 哪位大神知道这个牌匾用的什么字体? 本人想报考宜昌市的事业单位的事业编制,考试究竟包括哪些方面的内容?行测、申论?请各位指点~ 宜昌市有哪些事业单位? 准备跳槽去考宜昌的事业单位,求已经在宜昌事业单位工作过的前辈从个人发展前景和工资方面给点建议和帮助 登记之前怎么做婚前财产公证 如何办理婚前财产公证呢 房子的婚前财产公证怎么做 我想做个婚前财产公证,请问婚前财产怎么公证 自考 企业经济统计学0045 怎么 学习 自考实用卫生统计学置信区间怎么算 没学过高等数学怎样学习自考的教育与心理统计学 中专毕业想自考统计学,不要全日制。不知道要去哪个城市才有这个专业 自考本科2013年只有一次统计学原理的考试吗 自考概率论与数理统计学习方法及要有什么基础 谁来帮帮我啦!自考统计学基础和高数一哪个简单些? 国家有规定要求民办幼儿园不允许挂国学馆类的牌匾么? 幼儿园整套解决方案 梦见自己身体里钻进细细长长的类似蚯蚓或者蚂蝗之类的虫子 梦见类似蚯蚓状的软体动物钻进身体 IPHONE 6手机新建相册后,相机胶卷内的照片如何删除? ipad相机胶卷照片怎么删除 求助,怎么删除相机胶卷里的照片 准确率100的生男生女公式- 问一问 哪一种生男生女计算法特别准 生男生女计算法 准确率100的生男生女公式? 求好听的姓任的女孩的名字&#xF339; 好用的待办事项app? 姓任的取什么名字好听 哪个待办事项app 好用 ,大三的学生能参加国考吗? 给女孩起个名字 姓任 求助:安卓手机上有比较好用的待办事项的软件么 女孩姓任叫什么名好听,而不俗气啊 大四学生可以考公务员国考吗