今天查看数据库的警告日志时看到:Heap size 2267K exceeds notification threshold (2048K)
具体内容如下:
Memory Notification: Library Cache Object loaded into SGA
Heap size 2267K exceeds notification threshold (2048K)
Details in trace file /Oracle/admin/JH3G/udump/jh3g_ora_9800.trc
KGL object name :grant select on all_repcolumn_group to public with grant option
Thu Dec 1 18:28:52 2011
赶紧查询是啥原因,oracle的解释是:
NOTE: The default threshold in 10.2.0.1 is 2M. So these messages could show up frequently in some application environments
In 10.2.0.2, the threshold was increased to 50MB after regression tests, so this should be a reasonable and recommended value. If you continue to see the these warning messages in the alert log after applying 10.2.0.2 or higher, an SR may be in order to investigate if you are encountering a bug in the Shared Pool.
实用下面语句修改该参数的值为上面建议的50M:
SQL> alter system set "_kgl_large_heap_warning_threshold"=52428800 scope=spfile ;(这个值是以字节为单位的)
SQL> shutdown immediate
SQL> startup open
其他:
oracle的隐含参数(以_开头的参数),无法直接通过 show parameter来查看,可以通过X$KSPPI和X$KSPPCV视图来查看(sys用户)。
可以使用下面语句来查看相关信息:
SQL> select ki.KSPPINM NAME, kv.KSPPSTVL VALUE, kv.KSPPSTDVL DISPLAY_VALUE
from X$KSPPI ki, X$KSPPCV kv
where ki.indx = kv.indx
and ki.KSPPINM like '%&v_parameter%';
NAME VALUE DISPLAY_VALUE
_kgl_multi_instance_lock TRUE TRUE
_kgl_multi_instance_pin TRUE TRUE
_kgl_multi_instance_invalidation TRUE TRUE
_kgl_latch_count 0 0
_kgl_heap_size 1024 1024
_kgl_fixed_extents TRUE TRUE
_kgl_session_cached_objects 10 10
_kgl_keep_cache_pct 30 30
_kgl_keep_cache_retain_pct 20 20
_kgl_bucket_count 9 9
_kglsim_maxmem_percent 5 5
_kgl_hash_collision FALSE FALSE
_kgl_time_to_wait_for_locks 15 15
_kgl_large_heap_warning_threshold 2097152