« 陌上花开,可缓缓归矣 | Blog首页 | DB2新手上路:DB2命令行连接 »
Oracle Diagnostics:又见ORA-04031
链接:https://www.eygle.com/archives/2006/06/oracle_diagnost_ora_04031.html
今天,一个朋友的数据库出现问题,连接上去一看,原来又是ORA-04031:
[oracle@statdata bdump]$ sqlplus "/ as sysdba" SQL*Plus: Release 8.1.7.0.0 - Production on 星期五 6月 23 11:04:31 2006 (c) Copyright 2000 Oracle Corporation. All rights reserved. ERROR: |
sql*plus无法连接,想了一下才记起,还有svrmgrl可以用:
[oracle@statdata dbs]$ svrmgrl Oracle Server Manager Release 3.1.7.0.0 - Production Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved. Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production SVRMGR> connect internal pool","DATABASE","sga heap","state objects") |
在Oracle8.1.7.0.0中,ORA-04031的问题是由来已久的,使用svrmgrl也不能执行shutdown immediate了.只能通过shutdown abort关闭数据库后重起.
SVRMGR> connect internal Connected. SVRMGR> shutdown abort; ORACLE instance shut down. |
进一步检查发现这个数据库处于初始态运行,共享池设置的只有30M,过小的共享池设置也是导致ORA-04031的原因之一:
shared_pool_size = 31457280
db_block_buffers = 2048
对这两个参数进行了放大调整,主机毕竟有4G内存,调整后,ORA-04031错误应该会少很多了.
数据库关闭后,共享内存并未及时释放:
SVRMGR> connect internal ------ Shared Memory Segments -------- ------ Semaphore Arrays -------- ------ Message Queues -------- |
杀掉残余的Oracle进程后,共享内存释放:
[oracle@statdata dbs]$ ps -ef|grep ora /export/home/oracle/product/8.1.7/bin/tnslsnr LISTENER -inherit (ADDRESS=(PROTOCOL=beq))) /export/home/oracle/product/8.1.7/bin/tnslsnr LISTENER -inherit ------ Shared Memory Segments -------- ------ Semaphore Arrays -------- ------ Message Queues -------- [oracle@statdata dbs]$ svrmgrl Oracle Server Manager Release 3.1.7.0.0 - Production Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved. Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production SVRMGR> connect internal |
此时数据库可以成功启动.
历史上的今天...
>> 2011-06-23文章:
>> 2010-06-23文章:
>> 2008-06-23文章:
By eygle on 2006-06-23 15:53 | Comments (0) | Case | 806 |