
prompt
prompt 'get_param'
create or replace function get_param(p_name in varchar2)
return varchar2
as
	l_param_type      number;
	l_intval          binary_integer;
	l_strval          varchar2(256);
	invalid_paramter  exception;
	pragma  exception_init(invalid_paramter,-20000);
begin
	begin
		l_param_type := dbms_utility.get_parameter_value(parnam => p_name, intval => l_intval, strval => l_strval );
	exception
	  when invalid_paramter then
		return '*access denied*';
	end;
	if ( l_param_type = 0 ) then
		l_strval := to_char(l_intval);
	end if;
	return l_strval;
end;
/

exec dbms_output.put_line( get_param( 'db_block_size' ) );


