SET PAGESIZE     9999
SET VERIFY       OFF
SET SERVEROUTPUT ON  SIZE 500000 FORMAT WORD_WRAPPED
SET FEEDBACK     OFF
SET TRIMSPOOL    ON
SET LINESIZE 3500
SET PAGESIZE 35000

COLUMN NAME FORMAT A80
COLUMN VALUE FORMAT A30

ALTER SESSION set nls_numeric_characters = ',.';

-- Disect the input argument, and get the owner filter and table filter into two seperate 
-- substitution variables. The owner filter defaults to the current user.

/*
CREATE VIEW SYS.V_PARAMETER_HIDDEN
(
    NUM,
    NAME,
    TYPE,
    DISPLAY_VALUE,
    ISDEFAULT,
    ISSES_MODIFIABLE,
    ISSYS_MODIFIABLE,
    ISMODIFIED,
    ISADJUSTED,
    DESCRIPTION,
    UPDATE_COMMENT
)
AS
    SELECT x.indx + 1,
           ksppinm,
           ksppity,
           ksppstvl,
           ksppstdf,
           DECODE (BITAND (ksppiflg / 256, 1), 1, 'TRUE', 'FALSE'),
           DECODE (BITAND (ksppiflg / 65536, 3),
                   1, 'IMMEDIATE',
                   2, 'DEFERRED',
                   3, 'IMMEDIATE',
                   'FALSE'),
           DECODE (BITAND (ksppstvf, 7),
                   1, 'MODIFIED',
                   4, 'SYSTEM_MOD',
                   'FALSE'),
           DECODE (BITAND (ksppstvf, 2), 2, 'TRUE', 'FALSE'),
           ksppdesc,
           ksppstcmnt
      FROM x$ksppi x, x$ksppcv y
     WHERE (x.indx = y.indx);
*/

select a.ksppinm name, b.ksppstvl value
from sys.x$ksppi a, sys.x$ksppcv b
where a.indx = b. indx
and a.ksppinm like '%&&1%';

SET FEEDBACK ON
SET PAGESIZE 9999


set lines 300
column name format a35
column display_value format a30
column MOD_SES format a9
column MOD_SYS format a9
column description format a40

select name,display_value,ISSES_MODIFIABLE MOD_SES,ISSYS_MODIFIABLE MOD_SYS,ISMODIFIED,ISADJUSTED ADJUSTED,description 
from sys.v_parameter_hidden where name LIKE '%&1%' escape '/' order by name;

undefine &&1
