Tuesday, October 18, 2016

Getting oracle parameter value and description

Getting the parameter values and description is very important. Some times show parameter will not show every thing link in this case of underscore parameter

SQL> show parameter _gc_read_mostly_locking
SQL>


to get the values best is running the command below and passing the name of the parameter.


col Parameter FOR a30
col Instance FOR a10
col Description FOR a100 word_wrapped

SELECT a.ksppinm  "Parameter", c.ksppstvl "Instance", a.ksppdesc "Description"
FROM x$ksppi a, x$ksppcv b, x$ksppsv c, v$parameter p
WHERE a.indx = b.indx
AND a.indx = c.indx
AND p.name(+) = a.ksppinm
AND UPPER(a.ksppinm) LIKE UPPER('%&parameter%')
ORDER BY a.ksppinm;



Example:

SQL> col Parameter FOR a30
SQL> col Instance FOR a10
SQL> col Description FOR a100 word_wrapped
SQL>
SQL> SELECT a.ksppinm  "Parameter", c.ksppstvl "Instance",       a.ksppdesc "Description"
  2  FROM x$ksppi a, x$ksppcv b, x$ksppsv c, v$parameter p
  3  WHERE a.indx = b.indx
  4  AND a.indx = c.indx
  5  AND p.name(+) = a.ksppinm
  6  AND UPPER(a.ksppinm) LIKE UPPER('%&parameter%')
  7  ORDER BY a.ksppinm;
Enter value for parameter: _gc_read_mostly_lock
old   6: AND UPPER(a.ksppinm) LIKE UPPER('%&parameter%')
new   6: AND UPPER(a.ksppinm) LIKE UPPER('%_gc_read_mostly_lock%')

Parameter                      Instance   Description
------------------------------ ---------- -----------------------------------------------------------------
_gc_read_mostly_locking        TRUE       if TRUE, enable read-mostly locking

SQL> 

No comments: