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

摘要:
重新启动数据库时,忘记关闭应用程序。当您考虑到这一点时,您可以按ctrl+c立即强制停止数据库关闭,再次停止应用程序,然后立即关闭。此时,将报告错误。

在重启数据库的时候,忘记把一个应用关停了,想起来的时候,就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数据库的一次异常起停处理。》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇微信小程序navigator页面跳转失效原因在Ubuntu 16.04配置VNC Server (灰屏问题解决)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

PostgreSQL和Oracle的sql差异

PostgreSQL和Oracle的sql差异   1.rownum (1)Oracle分页查询使用rownum,PostgreSQL使用limit offset ORACLE POSTGRESQL select * from (select rownum r,e.* from emp e where rownum <=5) t where...

postman笔记1--postman插件安装教程

一、postman插件的安装 第一步:首先在网上下载postman插件的安装包,下载到自己的本地进行解压(如果懒得去下载的同学,可以根据网盘分享的安装包去下载:链接:https://pan.baidu.com/s/1CeOSd9GONWI0aoZfeKqmIQ 密码:v13p) 第二步:打开谷歌--找到扩展程序--点击进去-进入到扩展程序界面--点击【加载...

Chrome 浏览器快捷键

Ø  前言 记录下 Chrome 的快捷键,原文链接:http://www.cnblogs.com/mikalshao/archive/2010/11/03/1868568.html   1.   标签页和窗口快捷键 Ctrl + N 打开新窗口。 Ctrl + T 打开新标签页。 Ctrl + Shift + N 在隐身模式下打开新窗口。...

【转】foxmail突然打不开了,双击没反应,怎么回事呀

原文网址:http://tieba.baidu.com/p/3492526384 解决方法如下:1、进入foxmail安装目录(默认在D盘Program Files下层,右击foxmail这个文件夹,去掉只读;2、确定后,尝试打开foxmail,如果依然打不开,那么再重复第1条,发现foxmail文件夹变成只读,又是只读,没错,你没看错,又被360杀毒软件...

个性化windows10主题/换成winxp主题

win10系统主题手动更换为仿winXp系统主题 突然想念家里那台被遗忘了好久的旧电脑,思绪被拉回小时候偷玩电脑的场景。 如果你也是一个念旧的人的话,我相信你一定喜爱Windows XP的经典界面。 上个图:  实现步骤如下: 1、下载软件Classic Shell。 链接:https://pan.baidu.com/s/13cTkeSQOMwg8jOQQ...

SQL Server的链接服务器(MySQL、Oracle、Ms_sql、Access、SYBASE)

一、使用 Microsoft OLE DB Provider For ODBC 链接MySQL安装MySQL的ODBC驱动MyODBC1、为MySQL建立一个ODBC系统数据源,例如:选择数据库为test ,数据源名称为myDSN 2、建立链接数据库EXEC sp_addlinkedserver @server = 'MySQLTest', @srvpro...