[20171109]檢視隱含引數指令碼.txt

lfree發表於2017-11-10

[20171109]檢視隱含引數指令碼.txt

--//檢視隱含引數的指令碼,今天沒事修改一下增加查詢description欄位的內容.也有網友要求提供這個指令碼,實際上這些指令碼都是自己工作
--//中不斷收集整理.網上許多地方都能找到.

$ cat hide.sql
col name format a40
col description format a66
col session_value format a22
col default_value format a22
col system_value format a22

select
   a.ksppinm  name,
   a.ksppdesc DESCRIPTION,
   b.ksppstdf DEFAULT_VALUE,
   b.ksppstvl SESSION_VALUE,
   c.ksppstvl SYSTEM_VALUE
from x$ksppi a, x$ksppcv b, x$ksppsv c
where a.indx = b.indx
and a.indx = c.indx
and lower(a.ksppinm) like lower('%&1%')
order by 1;

--//修改如下:
col name format a40
col description format a66
col session_value format a22
col default_value format a22
col system_value format a22

select
   a.ksppinm  name,
   a.ksppdesc DESCRIPTION,
   b.ksppstdf DEFAULT_VALUE,
   b.ksppstvl SESSION_VALUE,
   c.ksppstvl SYSTEM_VALUE
from x$ksppi a, x$ksppcv b, x$ksppsv c
where a.indx = b.indx
and a.indx = c.indx
and lower(a.ksppinm) like lower('%&1%')
order by 1;

$ cat hidex.sql
col name format a40
col description format a66
col session_value format a22
col default_value format a22
col system_value format a22

select
   a.ksppinm  name,
   a.ksppdesc DESCRIPTION,
   b.ksppstdf DEFAULT_VALUE,
   b.ksppstvl SESSION_VALUE,
   c.ksppstvl SYSTEM_VALUE
from x$ksppi a, x$ksppcv b, x$ksppsv c
where a.indx = b.indx
and a.indx = c.indx
and (lower(a.ksppinm) like lower('%&1%') or  lower(a.ksppdesc ) like  lower('%&1%'))

--//順便測試看看,必須以sys使用者執行:
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> @ &r/hidex _allow%corr%
old  10:  and (lower(a.ksppinm) like lower('%&1%') or  lower(a.ksppdesc ) like  lower('%&1%'))
new  10:  and (lower(a.ksppinm) like lower('%_allow%corr%%') or  lower(a.ksppdesc ) like  lower('%_allow%corr%%'))
NAME                                     DESCRIPTION                                                        DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
---------------------------------------- ------------------------------------------------------------------ ------------- ------------- ------------
_allow_read_only_corruption              allow read-only open even if database is corrupt                   TRUE          FALSE         FALSE
_allow_resetlogs_corruption              allow resetlogs even if it will cause corruption                   TRUE          FALSE         FALSE
_allow_terminal_recovery_corruption      Finish terminal recovery even if it may cause corruption           TRUE          FALSE         FALSE
_kdli_allow_corrupt                      allow corrupt filesystem_logging data blocks during read/write     TRUE          TRUE          TRUE

--//^_^,發現一個_allow_read_only_corruption,感覺異常關閉,設定這個引數可以只讀開啟,明天測試看看.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2147066/,如需轉載,請註明出處,否則將追究法律責任。

相關文章