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]
April 26th, 2010 at 11:36 am
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
December 10th, 2010 at 2:18 pm
Yes It`s handy package! Even we can re compile invalid objects using it! @ Kamran I like your blog Keep posting