联系:手机/微信(+86 17813235971) QQ(107644445)
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
关闭数据库出现ORA-00379错误
SQL> shutdown immediate ORA-00604: 递归 SQL 级别 1 出现错误 ORA-00379: 缓冲池 DEFAULT 中无法提供 8K 块大小的空闲缓冲区
查看内存分配
SQL> show parameter sga; NAME TYPE VALUE ------------------------------------ ----------- ----------- lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 412M sga_target big integer 0 SQL> select * from v$sgainfo; NAME BYTES RES -------------------------------- ---------- --- Fixed SGA Size 1333676 No Redo Buffers 6078464 No Buffer Cache Size 104857600 Yes Shared Pool Size 142606336 Yes Large Pool Size 4194304 Yes Java Pool Size 12582912 Yes Streams Pool Size 0 Yes Shared IO Pool Size 0 Yes Granule Size 4194304 No Maximum SGA Size 431038464 No Startup overhead in Shared Pool 46137344 No Free SGA Memory Available 159383552 --spfile中分配情况 orcl.__db_cache_size=104857600 orcl.__java_pool_size=12582912 orcl.__large_pool_size=4194304 orcl.__pga_aggregate_target=104857600 orcl.__sga_target=281018368 orcl.__shared_io_pool_size=0 orcl.__shared_pool_size=142606336 orcl.__streams_pool_size=0 --初始化参数 *.sga_max_size=0 *.sga_target=536870912 *.memory_max_target=536870912 *.memory_target=536870912
alert日志
Mon Jul 02 11:30:19 2012 DIA0 started with pid=8, OS id=1520 Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_dia0_1520.trc (incident=10883): ORA-04030: out of process memory when trying to allocate 29916 bytes (heap_ksdhngreq,msg_body:ksdhng) Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_dia0_1520.trc (incident=10884): ORA-04030: out of process memory when trying to allocate 8204 bytes (diag pga,dbgtbDefaultBucket) ORA-04030: out of process memory when trying to allocate 29916 bytes (heap_ksdhngreq,msg_body:ksdhng) ORA-4030 : opidrv aborting process DIA0 ospid (1348_1520) Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_dia0_1520.trc (incident=12013): ORA-04030: out of process memory when trying to allocate 8204 bytes (diag pga,dbgtbDefaultBucket) ORA-04030: out of process memory when trying to allocate 8204 bytes (diag pga,dbgtbDefaultBucket) ORA-04030: out of process memory when trying to allocate 29916 bytes (heap_ksdhngreq,msg_body:ksdhng) Process debug not enabled via parameter _debug_enable Mon Jul 02 11:33:19 2012 Trace dumping is performing id=[cdmp_20120702113319] Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_smon_1820.trc: ORA-00379: no free buffers available in buffer pool DEFAULT for block size 8K ORA-00379: no free buffers available in buffer pool DEFAULT for block size 8K Mon Jul 02 11:33:49 2012 Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_smon_1820.trc: ORA-00379: no free buffers available in buffer pool DEFAULT for block size 8K Mon Jul 02 11:34:38 2012 Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_smon_1820.trc: ORA-00379: no free buffers available in buffer pool DEFAULT for block size 8K Mon Jul 02 11:37:05 2012 Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_2400.trc: ORA-00379: 缓冲池 DEFAULT 中无法提供 8K 块大小的空闲缓冲区 ORA-00379: 缓冲池 DEFAULT 中无法提供 8K 块大小的空闲缓冲区 ORA-00379: 缓冲池 DEFAULT 中无法提供 8K 块大小的空闲缓冲区 Tue Jul 03 09:58:06 2012 WARNING: sga_target 432013312 cannot be more than memory_target (432013312) - pga_aggregate_target (104857600/0) or untunable pga 104857600, 73783296
通过这里可以看出,系统的data buffe和pga都有内存不足的报错.
解决问题
问题的原因是由于内存分配不多,导致sga组件被消耗完,现在数据库不能正常关闭,修改了相关的内存参数的配置[避免该bug采用asmm内存管理]也无法生效,现在需要做的任务是重启数据库.导致数据库不能被关闭的原因是因为data buffer中的脏数据不能写入新数据.查询MOS发现是Bug 7702085.正常关闭库解决办法手工刷sga组件,然后升级数据库到11.2.0.1 (Base Release)/11.1.0.7.3 (Patch Set Update)/11.1.0.7 Patch 25 on Windows Platforms
SQL> alter system flush BUFFER_CACHE; System altered. SQL> alter system flush SHARED_POOL; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
数据库启动信息
这里可以看出数据库版本是11.1.0.6,内存使用的是AMM,查询MOS发现是一个Bug 7702085 – ORA-379 using Automatic Memory Management [ID 7702085.8]