show hidden parameter

联系:手机/微信(+86 17813235971) QQ(107644445)

标题:show hidden parameter

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

1、创建查看隐藏参数视图(show_hidden_v$parameter)

--conn "/ as sysdba"
create or replace view show_hidden_v$parameter
    (INST_ID, NUM , NAME , TYPE , VALUE , DISPLAY_VALUE, ISDEFAULT , ISSES_MODIFIABLE , ISSYS_MODIFIABLE , ISINSTANCE_MODIFIABLE,
    ISMODIFIED , ISADJUSTED , ISDEPRECATED, DESCRIPTION, UPDATE_COMMENT, HASH)
    as
    select x.inst_id,
           x.indx + 1,
           ksppinm,
           ksppity,
           ksppstvl,
          ksppstdvl,
          ksppstdf,
          decode(bitand(ksppiflg / 256, 1), 1, 'TRUE', 'FALSE'),
          decode(bitand(ksppiflg / 65536, 3),
                 1,
                 'IMMEDIATE',
                 2,
                 'DEFERRED',
                 3,
                 'IMMEDIATE',
                 'FALSE'),
          decode(bitand(ksppiflg, 4),
                 4,
                 'FALSE',
                 decode(bitand(ksppiflg / 65536, 3), 0, 'FALSE', 'TRUE')),
          decode(bitand(ksppstvf, 7), 1, 'MODIFIED', 4, 'SYSTEM_MOD', 'FALSE'),
          decode(bitand(ksppstvf, 2), 2, 'TRUE', 'FALSE'),
          decode(bitand(ksppilrmflg / 64, 1), 1, 'TRUE', 'FALSE'),
          ksppdesc,
          ksppstcmnt,
          ksppihash
     from x$ksppi x, x$ksppcv y
    where (x.indx = y.indx);

2、授权用户访问隐藏视图(show_hidden_v$parameter)

--conn "/ as sysdba"
grant select on show_hidden_v$parameter to chf;

3、建立同义词(v$parameter

--conn chf/xifenfei(sys下面已经有该同义词)
create synonym v$parameter for sys.show_hidden_v$parameter;

4、直接查询隐藏参数

select
x.ksppinm name,
x.ksppdesc description,
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') isadjusted 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 like '%_&par%'
order by
translate(x.ksppinm,'_','');

发表评论

邮箱地址不会被公开。 必填项已用*标注

5 × 1 =