ITPub博客

首页 > 数据库 > Oracle > v$parameter gv$parameter 视图 DDL 与隐含参数

v$parameter gv$parameter 视图 DDL 与隐含参数

原创 Oracle 作者:wpgy 时间:2020-02-07 20:52:08 0 删除 编辑

1. v$parameter

select * from v$fixed_view_definition a where a.VIEW_NAME='V$PARAMETER';

V$PARAMETER

select
     NUM
    ,NAME
    ,TYPE
    ,VALUE
    ,ISDEFAULT
    ,ISSES_MODIFIABLE
    ,ISSYS_MODIFIABLE
    ,ISMODIFIED
    ,ISADJUSTED
    ,DESCRIPTION
    ,UPDATE_COMMENT
from
GV$PARAMETER
where inst_id = USERENV('Instance')
;

2.gv$parameter

select * from v$fixed_view_definition a where a.VIEW_NAME='GV$PARAMETER';

GV$PARAMETER
select /*+ use_hash(x y) */
     x.inst_id
    ,x.indx+1 NUM
    ,ksppinm NAME
    ,ksppity TYPE
    ,ksppstvl VALUE
    ,ksppstdvl DISPLAY_VALUE
    ,ksppstdfl DEFAULT_VALUE -- 12c+ 特有

    ,ksppstdf ISDEFAULT
    ,decode(bitand(ksppiflg/256,1),1,'TRUE','FALSE') ISSES_MODIFIABLE
    ,decode(bitand(ksppiflg/65536,3),1,'IMMEDIATE',2,'DEFERRED',3,'IMMEDIATE','FALSE') ISSYS_MODIFIABLE
    ,decode(bitand(ksppiflg/524288,1),1,'TRUE','FALSE') ISPDB_MODIFIABLE -- 12c+ 特有

    ,decode(bitand(ksppiflg,4),4,'FALSE',decode(bitand(ksppiflg/65536,3), 0, 'FALSE', 'TRUE')) ISINSTANCE_MODIFIABLE
    ,decode(bitand(ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE') ISMODIFIED
    ,decode(bitand(ksppstvf,2),2,'TRUE','FALSE') ISADJUSTED
    ,decode(bitand(ksppilrmflg/64, 1), 1, 'TRUE', 'FALSE') ISDEPRECATED
    ,decode(bitand(ksppilrmflg/268435456, 1), 1, 'TRUE', 'FALSE') ISBASIC
    ,ksppdesc DESCRIPTION
    ,ksppstcmnt UPDATE_COMMENT
    ,ksppihash HASH
    ,y.con_id CON_ID -- 12c+ 特有
from x$ksppi x, x$ksppcv y
where
    (x.indx = y.indx)
    and bitand(ksppiflg,268435456) = 0
    and (
        (translate(ksppinm,'_','$') not like '$$%')
        and ((translate(ksppinm,'_','$') not like '$%') or (ksppstdf = 'FALSE') or (bitand(ksppstvf,5) > 0)) --注释掉这一行则显示普通参数和隐含参数
    )
;
x$ksppi, x$ksppcv 基本上包含所有数据库可调整参数,v$parameter展现的是不包含_开头的参数。
以_开头的参数我们通常称为隐含参数,一般不建议修改,但很多因为功能强大经常使用而广为人知

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31560527/viewspace-2674766/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
擅长: Oracle、MySQL, Python、PHP、Web 开发; 研究领域:数据库技术、自动化运维

注册时间:2018-11-01

  • 博文量
    29
  • 访问量
    39461