[20170502]11G查詢隱含引數檢視.txt
[20170502]11G查詢隱含引數檢視GV$SYSTEM_PARAMETER3.txt
--//oracle 存在許多隱含引數,一直以為oracle沒有提供正常的檢視查詢該內容,實際上oracle 11G已經提供這方面的功能,只不過oracle並不公開.
--//自己也是偶然發現:
1.環境:
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> column VIEW_DEFINITION format a120
SYS@book> SELECT * FROM V$FIXED_VIEW_DEFINITION WHERE VIEW_NAME like '%V$SYSTEM_PARAMETER%';
VIEW_NAME VIEW_DEFINITION
------------------------------ ------------------------------------------------------------------------------------------------------------------------
GV$SYSTEM_PARAMETER 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','FALSE'), decode(bitand(ksppstvf,2),2,'TRUE','FALSE'), decode(bit
and(ksppilrmflg/64, 1), 1, 'TRUE', 'FALSE'), decode(bitand(ksppilrmflg/268435456, 1), 1, 'TRUE', 'FALSE'), ksppdesc, k
sppstcmnt, ksppihash from x$ksppi x, x$ksppsv y where (x.indx = y.indx) and bitand(ksppiflg,268435456) = 0 and ((tran
slate(ksppinm,'_','#') not like '##%') and ((translate(ksppinm,'_','#') not like '#%') or (ksppstdf = 'FALSE') o
r (bitand(ksppstvf,5) > 0)))
V$SYSTEM_PARAMETER select NUM , NAME , TYPE , VALUE , DISPLAY_VALUE, ISDEFAULT , ISSES_MODIFIABLE , ISSYS_MODIFIABLE , ISINSTANCE_MODIFIA
BLE, ISMODIFIED , ISADJUSTED , ISDEPRECATED, ISBASIC, DESCRIPTION, UPDATE_COMMENT, HASH from GV$SYSTEM_PARAMETER where i
nst_id = USERENV('Instance')
GV$SYSTEM_PARAMETER2 select x.inst_id,kspftctxpn,ksppinm,ksppity,kspftctxvl, kspftctxdvl, kspftctxdf, 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(kspftctxvf,7),1,'MODIFIED','FALSE'), decode(bitand(kspftctxvf,2),2,'TRUE','FALSE')
, decode(bitand(ksppilrmflg/64, 1), 1, 'TRUE', 'FALSE'), decode(bitand(ksppilrmflg/268435456, 1), 1, 'TRUE', 'FALSE'),
ksppdesc, kspftctxvn, kspftctxct from x$ksppi x, x$ksppsv2 y where ((x.indx+1) = kspftctxpn) and ((translate(ksppin
m,'_','#') not like '##%') and (translate(ksppinm,'_','#') not like '#%' or (kspftctxdf = 'FALSE') or (bitand
(kspftctxvf,5) > 0)))
V$SYSTEM_PARAMETER2 select NUM, NAME, TYPE, VALUE, DISPLAY_VALUE, ISDEFAULT, ISSES_MODIFIABLE, ISSYS_MODIFIABLE , ISINSTANCE_MODIFIABLE, IS
MODIFIED , ISADJUSTED , ISDEPRECATED, ISBASIC, DESCRIPTION, ORDINAL, UPDATE_COMMENT from GV$SYSTEM_PARAMETER2 where inst
_id = USERENV('Instance')
GV$SYSTEM_PARAMETER3 select x.inst_id,x.indx+1,ksppinm,ksppstdvl from x$ksppi x, x$ksppsv y where (x.indx = y.indx)
GV$SYSTEM_PARAMETER4 select x.inst_id,kspftctxsid,kspftctxpn,ksppinm,ksppity,kspftctxdvl, kspftctxvn,kspftctxct, ksppilrmflg from x$ksppi x
, x$ksppsv2 y where ((x.indx+1) = kspftctxpn) and ((kspftctxdf = 'FALSE') or (bitand(kspftctxvf,8) = 8))
V$SYSTEM_PARAMETER4 select SID, NUM, NAME, TYPE, DISPLAY_VALUE, ORDINAL, UPDATE_COMMENT, PARAM_FLAG from GV$SYSTEM_PARAMETER4 where INST_id
= USERENV('Instance')
7 rows selected.
--//自己看還存在幾個檢視GV$SYSTEM_PARAMETER3,GV$SYSTEM_PARAMETER4,V$SYSTEM_PARAMETER4 ,很奇怪oracle並沒有像往常那樣建立V$SYSTEM_PARAMETER3.僅僅存在
--//GV$SYSTEM_PARAMETER3.btw:我查詢10.2.0.4版本沒有這些檢視.
--//很明顯GV$SYSTEM_PARAMETER3可以查詢全部引數.
2.對比看看:
SYS@book> @ &r/hide _allow_resetlogs_corruption
old 10: and lower(a.ksppinm) like lower('%&1%')
new 10: and lower(a.ksppinm) like lower('%_allow_resetlogs_corruption%')
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
--------------------------- ------------------------------------------------------------------ ---------------------- ---------------------- ----------------------
_allow_resetlogs_corruption allow resetlogs even if it will cause corruption TRUE FALSE FALSE
SYS@book> select * from GV$SYSTEM_PARAMETER4 where name like '%_allow_resetlogs_corruption%';
no rows selected
SYS@book> select * from GV$SYSTEM_PARAMETER3 where name like '%_allow_resetlogs_corruption%';
INST_ID NUM NAME DISPLAY_VALUE
---------- ---------- ---------------------------------------- -----------------
1 1265 _allow_resetlogs_corruption FALSE
--//奇怪oracle寫的為什麼不把描述帶出來.
3.另外注意一點:
SYS@book> select OWNER,VIEW_NAME from dba_views where view_name like '%SYSTEM_PARAMETER%';
OWNER VIEW_NAME
------ ------------------------------
SYS V_$SYSTEM_PARAMETER
SYS V_$SYSTEM_PARAMETER2
SYS GV_$SYSTEM_PARAMETER
SYS GV_$SYSTEM_PARAMETER2
--//很明顯oracle有所隱藏,必須以sys使用者執行訪問上面3個檢視(GV$SYSTEM_PARAMETER3,GV$SYSTEM_PARAMETER4,V$SYSTEM_PARAMETER4)
SCOTT@book> select * from SYS.GV$SYSTEM_PARAMETER4 where name like '%_allow_resetlogs_corruption%';
select * from SYS.GV$SYSTEM_PARAMETER4 where name like '%_allow_resetlogs_corruption%'
*
ERROR at line 1:
ORA-00942: table or view does not exist
SCOTT@book> select * from SYS.GV$SYSTEM_PARAMETER3 where name like '%_allow_resetlogs_corruption%';
select * from SYS.GV$SYSTEM_PARAMETER3 where name like '%_allow_resetlogs_corruption%'
*
ERROR at line 1:
ORA-00942: table or view does not exist
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2138276/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 隱含引數的查詢
- Oracle隱含引數的查詢Oracle
- oracle 檢視隱含引數指令碼Oracle指令碼
- [zt] 如何檢視Oracle 隱含引數Oracle
- oracle隱含引數的檢視與修改Oracle
- 【parameter】oracle的隱含引數的檢視Oracle
- [20171109]檢視隱含引數指令碼.txt指令碼
- 隱含引數的查詢x$ksppi,x$ksppcv
- v$動態效能檢視和隱含引數
- oracle 11g常用隱含引數Oracle
- 查詢資料庫隱含引數的sql語句資料庫SQL
- 【指令碼】隱含引數及註釋資訊的查詢方法指令碼
- 隱藏引數查詢sqlSQL
- 檢視oracle隱藏引數Oracle
- Oracle 隱含引數Oracle
- ORACLE隱含引數Oracle
- 檢視oralce10g,11g隱含引數,並在SQLPLUS視窗格式化輸出SQL
- Oracle隱形引數查詢指令碼Oracle指令碼
- 查詢oracle中的隱形引數Oracle
- 隱藏引數查詢和dictionary viewView
- 檢視Oracle隱藏引數的SQLOracleSQL
- Oracle 11G 隱含引數“_controlfile_autobackup_delay”Oracle
- oracle獲取隱含引數Oracle
- Oracle的隱含引數(zt)Oracle
- [20190401]隱含引數_mutex_spin_count.txtMutex
- oracle隱藏引數的檢視和使用Oracle
- Oracle 11g中的_optimizer_null_aware_antijoin隱含引數OracleNull
- 11g 日誌目錄查詢檢視
- 獲取Oracle隱含引數資訊Oracle
- 獲取oracle的隱含引數Oracle
- oracle的一個隱含引數Oracle
- Oracle 中所有隱含的 引數Oracle
- 探究隱含引數_fairness_thresholdAI
- 常用指令碼:獲取隱含引數指令碼
- 隱式轉換影響物化檢視查詢重寫
- 物化檢視和query_rewrite_enabled引數配合提高select查詢效能
- oracle 11g show parameter顯示隱含引數hidden parameter_x$ksppiOracle
- [20160501]檢視包引數指令碼.txt指令碼