数据库版本:oracle11g 11.0.2.0.4

SQL> desc x$ksppi;
Name      Null?    Type
-------------------- -------- ----------------------------
ADDR                RAW(8)         ---->内存地址
INDX            NUMBER        ---->序号
INST_ID          NUMBER  ---->instance number
KSPPINM         VARCHAR2(80)   ---->参数名称
KSPPITY          NUMBER              ---->参数类型
KSPPDESC           VARCHAR2(255)   ---->参数描述
KSPPIFLG             NUMBER             ---->标志字段 
KSPPILRMFLG           NUMBER
KSPPIHASH          NUMBER

SQL> desc x$ksppcv;
Name      Null?    Type
-------------------- -------- ----------------------------
ADDR          RAW(8)             ---->内存地址
INDX            NUMBER          ---->序号
INST_ID            NUMBER          ----->instance number
KSPPSTVL       VARCHAR2(4000)     ---->value,参数值
KSPPSTDVL          VARCHAR2(4000)    
KSPPSTDF       VARCHAR2(9)           ---->缺省值
KSPPSTVF        NUMBER                  ---->标志字段
KSPPSTCMNT       VARCHAR2(255)       ---->comment

查看隐含参数及值

select
pi.indx+1 numb,
pi.ksppinm name,
sv.ksppstvl value,
pi.ksppity type,
sv.ksppstdf is_default,
decode(bitand(pi.ksppiflg/256,1), 1,'True', 'False' ) is_session_modifiable,
decode(bitand(pi.ksppiflg/65536,3), 1,'Immediate', 2,'Deferred' , 3,'Immediate', 'False' ) is_system_modifiable,
decode(bitand(sv.ksppstvf,7), 1,'Modified', 4,'System Modified', 'False' ) is_modified,
decode(bitand(sv.ksppstvf,2), 2,'True', 'False' ) is_adjusted,
pi.ksppdesc description
from
x$ksppi pi,
x$ksppsv sv
where
pi.indx = sv.indx
;

      查询结果如下:

      

       由于GV$PARAMETER也是查询参数的,但是他们有什么不同呢。

     SELECT view_definition FROM v$fixed_view_definition WHERE view_name = 'GV$PARAMETER'; ------>通过数据字典查看生成GV$PARAMETER视图的SQL语句
 /* Formatted on 2019/1/10 上午 10:00:25 (QP5 v5.326) */
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'),
DECODE (BITAND (ksppilrmflg / 268435456, 1), 1, 'TRUE', 'FALSE'),
ksppdesc,
ksppstcmnt,
ksppihash
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 '#%') ---->筛选,将以下划线'_'开头的替换成'#'开头,然后排除(有点困惑,为什么不直接not like '_%' 排除)
OR (ksppstdf = 'FALSE')
OR (BITAND (ksppstvf, 5) > 0)))

    

decode函数比较1个参数时

SELECT ID,DECODE(inParam,'beComparedParam','值1' ,'值2') name FROM table

如果第一个参数inParam=='beComparedParam',则select得到的name显示为值1,

如果第一个参数inParam!='beComparedParam',则select得到的name显示为值2

decode函数比较多个参数时

SELECT ID,DECODE(inParam,'para1','值1' ,'para2','值2','para3','值3','para4','值4','para5','值5','default') name FROM table

如果第一个参数inParam=='para1'那么那么select得到的那么显示为值1;

如果第一个参数inParam=='para2'那么那么select得到的那么显示为值2;

如果第一个参数inParam=='para3'那么那么select得到的那么显示为值3;

如果第一个参数inParam=='para4'那么那么select得到的那么显示为值4;

如果第一个参数inParam=='para5'那么那么select得到的那么显示为值5;

都不相等就为'default '

    BITAND( nExpression1 ,nExpression2 )

    将   nExpression1   的每一位同   nExpression2   的相应位进行比较。如果   nExpression1   和   nExpression2   的位都是   1,相应的结果位就是   1;否则相应的结果位是   0   ------->1and1 = 1 ,  1and0 = 0   ,  0and0 = 0

    TRANSLATE(string,from_str,to_str)

    返回将(所有出现的)from_str中的每个字符替换为to_str中的相应字符以后的string。TRANSLATE 是 REPLACE 所提供的功能的一个超集。如果 from_str 比 to_str 长,那么在 from_str 中而不在 to_str 中的额外字符将从 string 中被删除,

    因为它们没有相应的替换字符。to_str 不能为空。Oracle 将空字符串解释为 NULL,并且如果TRANSLATE 中的任何参数为NULL,那么结果也是 NULL。

x$ksppi与x$ksppcv查询隐藏参数的更多相关文章

  1. 实验隐藏参数"_allow_resetlogs_corruption"的使用

    实验环境:OEL 5.7 + Oracle 10.2.0.5 Tips:该参数仅在特殊恢复场景下使用,需要在专业Oracle工程师指导下进行操作. 1.隐藏参数说明 2.故障场景再现 3.非常规恢复 ...

  2. oracle 查看隐藏参数

    隐藏参数 (hidden parameters) ,由oracle内部使用,以 '_' 开头. 可以通过以下两种方式查看所有隐藏参数: SELECT   i.ksppinm name, i.ksppd ...

  3. 转 rman-08120 以及查询隐含参数

    rman-08120 We need RMAN to automatically purge archivelogs from the FRA once they are applied to the ...

  4. ORACLE隐藏参数查看及修改

    查看隐藏参数 select x.ksppinm name, y.ksppstvl value, y.ksppstdf isdefault, decode(bitand(y.ksppstvf,7),1, ...

  5. ORACLE查询隐含参数

    查询隐含参数:col name for a30col VALUE for a10col DESCRIB for a40set lines 200SELECT x.ksppinm NAME, y.ksp ...

  6. 使用Location对象查询字符串参数

    location是BOM中最有用的对象之一: 1.它提供了与当前窗口中加载的文档有关的信息: 2.他还提供了一些导航功能. location对象的属性有: hash, host, hostname, ...

  7. Delphi 中的 procedure of object (类方法存在一个隐藏参数self),简单深刻 good

    其实要了解这些东西,适当的学些反汇编,WINDOWS内存管理机制,PE结构,看下李维的VCL架构剖析可以很好理解type TMyEvent = procedure of object;这是一种数据类型 ...

  8. Delphi函数指针的两种定义(对象方法存在一个隐藏参数self,所以不能相互赋值)

    delphi中经常见到以下两种定义 Type TMouseProc = procedure (X,Y:integer); TMouseEvent = procedure (X,Y:integer) o ...

  9. Oracle12c版本中未归档隐藏参数

    In this post, I will give a list of all undocumented parameters in Oracle 12.1.0.1c. Here is a query ...

随机推荐

  1. 应用ArcGIS Server JavaScript API实现地图卷帘效果实现

    var maskDynamicMapServiceLayer = null; var maskDynamicMapServiceLayerDiv = null; var pointNumb = 0; ...

  2. 【Android】RxJava的使用(二)Action

    回顾 在上一节Android RxJava的使用(一)基本用法中,介绍了RxJava的基本用法.下面来回顾下实现一次RxJava的基本使用.例:分别打印"Hellow"." ...

  3. 破解 jeb 2.3.7 demo

    前言 使用的技术和上文的一样. mips 版本的修改版 修改版: https://gitee.com/hac425/jeb-mips 正文 安卓版 jeb-2.3.7.201710262129-JEB ...

  4. 深入理解net core中的依赖注入、Singleton、Scoped、Transient(四)

    相关文章: 深入理解net core中的依赖注入.Singleton.Scoped.Transient(一) 深入理解net core中的依赖注入.Singleton.Scoped.Transient ...

  5. 【Java】得到本机IP

    import java.net.InetAddress; import java.net.UnknownHostException; public class MainProcess { public ...

  6. .net下log4net的使用

    这里以控制台应用程序为例 首先是要添加引用: 安装后可以看到项目中多了log4net的引用: 添加应用程序配置文件app.config,配置log4net <?xml version=" ...

  7. 使用keychain永久存储数据

    使用keychain永久存储数据 https://github.com/soffes/sskeychain keychain当然还是使用开源的好:),keychain是干啥用的?这个,baidu一下你 ...

  8. Linux xargs命令详解

    find命令把匹配到的文件传递给xargs命令,而xargs命令每次只获取一部分文件而不是全部 xargs要处理的文件如果不是在结尾,需要加上 -i这个参数 xargs常见命令参数 args:xarg ...

  9. spring-springmvc-hibernate项目小结

    1. web.xml中别忘记加入spring监听器 <listener> <listener-class>org.springframework.web.context.Con ...

  10. 只要下面看到func() 带括号的,就会弹上去找对应的函数,然后执行相应的函数块

    def func1(): print("呵呵")def func2(): print("呵呵")def func3(): print("呵呵" ...