让Oracle的SHOW PARAMETER命令显示隐藏参数
让Oracle的SHOW PARAMETER命令显示隐藏参数Find internal of "show parameter" by session tracingSQL> select * from v$version; www.zzzyk.comBANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionPL/SQL Release 11.2.0.3.0 - ProductionCORE 11.2.0.3.0 ProductionTNS for Linux: Version 11.2.0.3.0 - ProductionNLSRTL Version 11.2.0.3.0 - ProductionSQL> alter session set sql_trace=true;Session altered.SQL> oradebug setmypidStatement processed.SQL> show parameter optimizerNAME TYPE VALUE------------------------------------ ----------- ------------------------------optimizer_capture_sql_plan_baselines boolean FALSEoptimizer_dynamic_sampling integer 2optimizer_features_enable string 11.2.0.3optimizer_index_caching integer 0optimizer_index_cost_adj integer 100optimizer_mode string ALL_ROWSoptimizer_secure_view_merging boolean TRUEoptimizer_use_invisible_indexes boolean FALSEoptimizer_use_pending_statistics boolean FALSEoptimizer_use_sql_plan_baselines boolean TRUESQL> oradebug tracefile_name/u01/app/oracle/diag/rdbms/zhongwc/zhongwc/trace/zhongwc_ora_32320.trcFind internal sql statement in trace file.The major statement in trace file looks like following.It's clear that "show parameter" actually make query on view v$parameter.SELECT NAME NAME_COL_PLUS_SHOW_PARAM,DECODE(TYPE,1,'boolean',2,'string',3,'integer',4,'file',5,'number',6,'big integer','unknown') TYPE,DISPLAY_VALUE VALUE_CL_PLUS_SHOW_PARAMFROM V$PARAMETERWHERE UPPER(NAME) LIKE UPPER('%optimizer%')ORDER BY NAME_COL_PLUS_SHOW_PARAM, ROWNUM;Examing definition of view v$parameterSQL> SELECT view_definition FROM v$fixed_view_definition WHERE view_name = 'V$PARAMETER';VIEW_DEFINITION----------------------------------------------------------------------------------------------------select NUM , NAME , TYPE , VALUE , DISPLAY_VALUE, ISDEFAULT , ISSES_MODIFIABLE , ISSYS_MODIFIABLE ,ISINSTANCE_MODIFIABLE, ISMODIFIED , ISADJUSTED , ISDEPRECATED, ISBASIC, DESCRIPTION, UPDATE_COMMENT, HASH from GV$PARAMETER where inst_id = USERENV('Instance')Examing definition of view gv$parameterhidden init parameters start with character '_'SQL> SELECT view_definition FROM v$fixed_view_definition WHERE view_name = 'GV$PARAMETER';VIEW_DEFINITION--------------------------------------------------------------------------------select x.inst_id,x.indx+1,ksppinm,ksppity,ksppstvl, ksppstdvl, ksppstdf, decode(bitand(ksppi易做图/256,1),1,'TRUE','FALSE'), decode(bitand(ksppi易做图/65536,3),1,'IMMEDIATE',2,'DEFERRED', 3,'IMMEDIATE','FALSE'),decode(bitand(ksppi易做图,4),4,'FALSE', decode(bitand(ksppi易做图/65536,3), 0, 'FALSE', 'TRUE')), decode(bitand(ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE'), decode(bitand(ksppstvf,2),2,'TRUE','FALSE'), decode(bitand(ksppilrm易做图/64, 1), 1, 'TRUE', 'FALSE'), decode(bitand(ksppilrm易做图/268435456, 1), 1, 'TRUE', 'FALSE'), ksppdesc, ksppstcmnt, ksppihash from x$ksppi x, x$ksppcv y where (x.indx = y.indx) and bitand(ksppi易做图,268435456)= 0 and ((translate(ksppinm,'_','#') not like '##%') and ((translate(ksppinm,'_','#') not like '#%') or (ksppstdf = 'FALSE') or (bitand(ksppstvf,5) > 0)))Create pseudo-view of v$paramter[oracle@zhongwc ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Fri Mar 1 09:01:58 2013Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, Automatic Storage Management, OLAP, Data Miningand Real Application Testing optionsSQL> create or replace view my_v$parameter_with_hidden(NUM,NAME , TYPE, display_Value , ISDEFAULT , ISSES_MODIFIABLE ,ISSYS_MODIFIABLE ,ISMODIFIED , ISADJUSTED, DESCRIPTION,UPDATE_COMMENT)asselect x.indx+1,ksppinm,ksppity,ksppstvl,ksppstdf,decode(bitand(ksppi易做图/256,1),1,'TRUE','FALSE'),decode(bitand(ksppi易做图/65536,3),1,'IMMEDIATE',2,'上一个:Oracle体系结构概述
下一个:oracle session基本应用
- 更多Oracle疑问解答:
- 运行exp备份oracle数据库提示oracle-12154错误
- 有没有,生产Oracle Rman 备份脚本的工具啊!
- 初学orcle,希望有大大帮忙解说一下详细步骤,从登录oracle到创建表的过程
- oracle语句问题:一张user表,三个字段,id,name,time,插入记录比如:张三2007,李四2008,张三2011
- 如何写一个ORACLE触发器同步两个表中的数据?
- oracle 如何查看一个服务器上有多少个数据库.
- oracle 创建包的时候错误 求解
- oracle 重复列的问题
- oracle 中如何查处2星期前的数据
- 请教oracle数据库安装中的问题
- 请问谁能提供给我标准的oracle ERP的数据库表结构并详细说明各表主要的作用?
- 安装oracle遇到的问题 invalid entry CRC (expected 0x3e12e795 but got 0x9db0e9fd)
- 我的是ORACLE 10G,在RMAN中如何按指定的时间恢复数据文件啊?
- oracle为什么没有自动增长列
- oracle快捷键都有哪些啊?