oracle 隐含参数修改

来源:互联网 发布:交叉网络外部性 编辑:程序博客网 时间:2024/05/22 03:21
1.   可以通过如下方式查询当前实例的所有隐含参数:


col name for a30;
col value for a10;
select
x.ksppinm  name,
y.ksppstvl  value,
y.ksppstdf  isdefault,
decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE')  ismod,
decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE')  isadj
from
sys.x$ksppi x,
sys.x$ksppcv y
where
x.inst_id = userenv('Instance') and
y.inst_id = userenv('Instance') and
x.indx = y.indx 
order by
translate(x.ksppinm, ' _', ' ')
/


查询结果部分截图:


NAME       VALUE ISDEFAULT ISMOD      ISADJ
------------------------------ ---------- --------- ---------- -----
_xsolapi_use_olap_dml       TRUE TRUE    FALSE      FALSE
_xsolapi_use_olap_dml_for_rank TRUE  TRUE   FALSE      FALSE
_xtbuffer_size               0          TRUE    FALSE      FALSE


2.  如果想查询某一个具体的隐含参数的值,只需要在上面原基础上加上 and x.ksppinm ='XXXXX'  过滤。 


例如查询 _gc_undo_affinity 。


col name for a30;
col value for a10;
select
x.ksppinm  name,
y.ksppstvl  value,
y.ksppstdf  isdefault,
decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE')  ismod,
decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE')  isadj
from
sys.x$ksppi x,
sys.x$ksppcv y
where
x.inst_id = userenv('Instance') and
y.inst_id = userenv('Instance') and
x.indx = y.indx and x.ksppinm ='_enable_NUMA_support'
order by
translate(x.ksppinm, ' _', ' ');




修改隐含参数时, alter system set "parameter_name"=value scope=both sid='*';  
有些可以在memory而有些仅仅可以通过spfile更改, 尝试一下就知道了  

需要注意的是一定要加上双引号, 另外引号内不能有空格, 只能包含参数的名字


Oracle NUMA(Non Uniform Memory Architecture)support can be used with large SMP multiprocessor environments with NUMA hardware。  启用Oracle NUMA support 会有效的使用底层的NUMA硬件,并且可能提升db 性能。  Oracle NUMA support 需要  硬件,os,和 oracle db version 的正确组合。  从oracle db 11.2.0.1开始,默认Oracle NUMA support是被禁用的。  本文描述了Oracle db 11gR2情况下,Oracle NUMA support 的启用方法  Oracle db 11.2之前版本 的环境中,使用NUMA的建议和对NUMA的支持,请见mos文章:Note:759565.1  请小心启用 NUMA支持。请联系你的硬件供应商以获取你的硬件和操作系统有关NUMA兼容性的信息。、  推荐:  Customers who have tuned their Database specifically for NUMA can continue to run with NUMA enabled with Oracle Server Version 11.2.0.1.  It is strongly recommended to customers who want to enable NUMA do sufficient testing before going into production.
行动:
oracle db 11.2中启用NUMA的步骤:
  在一个NUMA兼容的环境中使用 oracle db 11.2时,默认Oracle 将不会检测硬件和os 的NUMA兼容性,也不会启用Oracle NUMA support
  设置如下的隐含参数以启用NUMA support
  [html] view plain copy 在CODE上查看代码片派生到我的代码片
  _enable_NUMA_support=TRUE
  除此之外,不需要其他的步骤。
  _enable_NUMA_support 这个参数取代了 _enable_NUMA_optimization 这个参数。若是使用 _enable_NUMA_optimization参数来代替_enable_NUMA_support参数,在alert log中会有报警:
  [html] view plain copy 在CODE上查看代码片派生到我的代码片
  ..._enable_NUMA_optimization is deprecated please use _enable_NUMA_support instead....
  一旦在参数文件中设置了_enable_NUMA_support参数,并且oracle db 11.2 运行在NUMA兼容的环境中,那么数据库实例的alert日志将会有 NUMA support 已经被启用的反馈,并能显示何种NUMA配置被检测到。
  举例,在a 8 NUMA domains Linux system with 48 cores:
  [html] view plain copy 在CODE上查看代码片派生到我的代码片
  ...NUMA system found and support enabled (8 domains - 6,6,6,6,6,6,6,6)...
  警告:
  禁用或者启用会改变应用程序的性能
  在生产环境启用NUMA support之前,建议在测试环境中进行评估
  当Oracle NUMA support被禁用时,操作系统和 硬件配置可能需要调整或者重新配置,请咨询你的硬件供应商以获取更多的信息和推荐。