Kamran Agayev's Oracle Blog

Oracle Certified Master

DBMS_UTILITY.GET_PARAMETER_VALUE

Posted by Kamran Agayev A. on April 23rd, 2010

There’re different ways to get the values of the parameter file using PL/SQL. One of them is using DBMS_UTILITY.GET_PARAMETER_VALUE function. In the following example, I print the value of the compatible parameter of the parameter file:

[sourcecode language=”css”] 

SQL>set serveroutput on;
 declare
    id number;
    str varchar2(40);
 begin
    id:=dbms_utility.get_parameter_value(‘compatible’,id,str);
    dbms_output.put_line(str);
 end;
 /
SQL>   10.2.0.2.0
PL/SQL procedure successfully completed. [/sourcecode]

2 Responses to “DBMS_UTILITY.GET_PARAMETER_VALUE”

  1. Ulfat Says:

    Some action can be done as using :
    package dbms_utility
    PROCEDURE db_version(version OUT VARCHAR2, compatibility OUT VARCHAR2); dbms_utility.db_version(ver,com);

    Ex:

    declare
    ver varchar2(100);
    com varchar2(100);
    begin
    dbms_utility.db_version(ver,com);
    dbms_output.put_line(ver||’ – ‘||com);
    end;

    In a nutshell, dbms_utility package one of the necessary packages, we can use it for below purposes:
    analyze_schema, analyze_database, get_time, analyze_part_object, exec_ddl_statement, get_dependency, get_cpu_time etc

  2. sriram Says:

    Yes It`s handy package! Even we can re compile invalid objects using it! @ Kamran I like your blog Keep posting

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>