Gblog

おもにTips

19c の隠しパラメータ全部抜く

SQL

ちなみに "__" (アンダースコア2つ)で始まるパラメータは除く

 

set lin 2000 pages 2000 trims on term off
set markup csv on 

spool initparam.txt
select
    /*+ use_hash(x y) */
    x.indx + 1                                                                                        as NUM                   ,
    ksppinm                                                                                           as NAME                  ,
    ksppity                                                                                           as TYPE                  ,
    ksppstvl                                                                                          as VALUE                 ,
    ksppstdvl                                                                                         as DISPLAY_VALUE         ,
    ksppstdfl                                                                                         as DEFAULT_VALUE         ,
    ksppstdf                                                                                          as ISDEFAULT             ,
    decode(bitand(ksppiflg / 256, 1), 1, 'TRUE', 'FALSE')                                             as ISSES_MODIFIABLE      ,
    decode(bitand(ksppiflg / 65536, 3), 1, 'IMMEDIATE', 2, 'DEFERRED', 3, 'IMMEDIATE', 'FALSE')       as ISSYS_MODIFIABLE      ,
    decode(bitand(ksppiflg / 524288, 1), 1, 'TRUE', 'FALSE')                                          as ISPDB_MODIFIABLE      ,
    decode(bitand(ksppiflg, 4), 4, 'FALSE', decode(bitand(ksppiflg / 65536, 3), 0, 'FALSE', 'TRUE'))  as ISINSTANCE_MODIFIABLE ,
    decode(bitand(ksppstvf, 7), 1, 'MODIFIED', 4, 'SYSTEM_MOD', 'FALSE')                              as ISMODIFIED            ,
    decode(bitand(ksppstvf, 2), 2, 'TRUE', 'FALSE')                                                   as ISADJUSTED            ,
    decode(bitand(ksppilrmflg / 64, 1), 1, 'TRUE', 'FALSE')                                           as ISDEPRECATED          ,
    decode(bitand(ksppilrmflg / 268435456, 1), 1, 'TRUE', 'FALSE')                                    as ISBASIC               ,
    ksppdesc                                                                                          as DESCRIPTION           ,
    ksppstcmnt                                                                                        as UPDATE_COMMENT        ,
    ksppihash                                                                                         as HASH                  ,
    y.con_id                                                                                          as CON_ID                
from
    x$ksppi x,  x$ksppcv y
where
    ( x.indx = y.indx )  and
    bitand(ksppiflg, 268435456) = 0 and
    ( (translate(ksppinm, '_', '$') not like '$$%') )
/