getparadesp语句
用例:
set line 302
col name format a40
col value for a25
select
x.ksppinm name,
y.ksppstvl value,
y.ksppstdf isdfault,
decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE') ismod,
decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE') ISADJ
from
sys.x$ksppi x,
sys.x$ksppcv y
where
x.inst_id=userenv('Instance') and
y.inst_id=userenv('Instance') and
x.indx=y.indx and
x.ksppinm like '%_&par%'
order by
translate(x.ksppinm,'_','')
/
col name format a40
col value for a25
select
x.ksppinm name,
y.ksppstvl value,
y.ksppstdf isdfault,
decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE') ismod,
decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE') ISADJ
from
sys.x$ksppi x,
sys.x$ksppcv y
where
x.inst_id=userenv('Instance') and
y.inst_id=userenv('Instance') and
x.indx=y.indx and
x.ksppinm like '%_&par%'
order by
translate(x.ksppinm,'_','')
/
SQL> @getpardesp.sql
Enter value for par: lru
old 14: x.ksppinm like '%_&par%'
new 14: x.ksppinm like '%_lru%'
NAME VALUE ISDFAULT ISMOD ISADJ
---------------------------------------- ------------------------- --------- ---------- -----
_simulator_lru_rebalance_thresh 10240 TRUE FALSE FALSE
_simulator_lru_rebalance_sizthr 2 TRUE FALSE FALSE
_gc_global_lru AUTO TRUE FALSE FALSE
_db_block_lru_latches 128 TRUE FALSE FALSE
_simulator_lru_scan_count 8 TRUE FALSE FALSE
Elapsed: 00:00:00.03
SQL>
Enter value for par: lru
old 14: x.ksppinm like '%_&par%'
new 14: x.ksppinm like '%_lru%'
NAME VALUE ISDFAULT ISMOD ISADJ
---------------------------------------- ------------------------- --------- ---------- -----
_simulator_lru_rebalance_thresh 10240 TRUE FALSE FALSE
_simulator_lru_rebalance_sizthr 2 TRUE FALSE FALSE
_gc_global_lru AUTO TRUE FALSE FALSE
_db_block_lru_latches 128 TRUE FALSE FALSE
_simulator_lru_scan_count 8 TRUE FALSE FALSE
Elapsed: 00:00:00.03
SQL>
本文出自 “Focus on Oracle” 博客,请务必保留此出处http://alexy.blog.51cto.com/6115453/1089183