您的位置:首页 > 数据库 > Oracle

Oracle shutdown immediate遭遇ORA-24324 ORA-24323 ORA-01089

2016-08-06 09:16 796 查看
一数据库服务器执行shutdownimmediate时,遇到了下面ORA错误,如下所示:

$sqlplus/assysdba
SQL*Plus:Release10.2.0.4.0-ProductiononFriAug510:56:242016
Copyright(c)1982,2007,Oracle.AllRightsReserved.
Connectedto:
OracleDatabase10gRelease10.2.0.4.0-64bitProduction
SQL>shutdownimmediate;
ORA-03113:end-of-fileoncommunicationchannel
SQL>exit




检查告警日志,发现其一直停留在"Jobqueueslaveprocessesstopped".退出sqlplus然后重新登录,重新执行shutdownimmediate



$sqlplus/assysdba
SQL*Plus:Release10.2.0.4.0-ProductiononFriAug511:03:452016
Copyright(c)1982,2007,Oracle.AllRightsReserved.
Connected.
SQL>shutdownimmediate;
ORA-24324:servicehandlenotinitialized
ORA-24323:valuenotallowed
ORA-01089:immediateshutdowninprogress-nooperationsarepermitted
SQL>



后面退出会话,然后登陆sqlplus,使用shutdownabort才将数据库关闭。处理完成后,查了一下metallink官方文档,发现引起错误的原因为:
Backgroundprocessesarehanging/notstartedcorrectlyduringthepreviousstartupofthisdatabase.
Hencethesemaphoresandsharedmemorysegmentsarenotgettingdetachedproperlynowduringshutdown.
以后遇到这个问题,可以使用下面步骤处理:
1.Verifythattherearenobackgroundprocessesownedby"oracle",iftherearekillthem
$ps-ef|grepora_|grep$ORACLE_SID
2.Removesharedmemoryandsemaphores:
A)Checkforsharedmemoryandsemaphores
$ipcs-mt(ifthereisanythingownedbyoracleremoveit)
$ipcrm-m[ID](toremoveit)
B)Checkandremovesemaphores
$ipcs-sbt(ifthereisanythingownedbyoracleremoveit)
$ipcrm-s[ID](toremoveit)
C)Removesgaandlkfile
$cd$ORACLE_HOME/dbs
$rmsgadef<SID>.dbf(removingsgafile)
$ORACLE_HOME/dbs/lk<sid>(removinglk...flies)
D)Ifdatabaseisdown,trytobringuporacleonestepatatime:
$sqlplus/nolog
SQL>startupnomountpfile=...[path]
SQL>alterdatabasemount;
SQL>alterdatabaseopen;\
Otherwise,exitcurrentSQL*Plussessionandverifythefollowingenvironmentvariablesareset.
echo$ORACLE_HOME
echo$ORACLE_SID(echo%ORACLE_SID%onWindows)
Then,Executethefollowing:
sqlplus/assysdba
shutdownabort
exit
sqlplus/assysdba
startup
如上官方资料所示,两种解决方案。关于第一种方案,简单梳理如下:
1:清理后台进程,一般找到相关进程后,使用kill命令杀掉。
2:清理共享内存段
3:清理信号集
注意,在RHEL中,ipcs-sbt命令会报错"ipcs:invalidoption--b",这个是因为Linux上的ipcs命令,不支持UNIX上的-b,所以不能照本宣科,不要使用参数b.具体参考官方文档ipcsmanpagedescribesinvalid-boptioninRHEL5
4:删除sgaandlk文件。
ipcs相关资料:
ipcs命令往标准输出写入一些关于活动进程间通信设施的信息。如果没有指定任何标志,ipcs命令用简短格式写入一些关于当前活动消息队列、共享内存段、信号量、远程队列和本地队列标题。
参考资料:
ORA-24324DuringStartuporShutdown(文档ID794293.1)
ORA-1089DuringShutdownImmediate(文档ID1014091.102)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐