ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Utilities for working with user defined types.
AUTHID
DEFINER
Data Types
CREATE OR REPLACE NONEDITIONABLE TYPE sys.dbms_objects_utils_tnamearr AS TABLE OF dbms_objects_utils_tname;
/
CREATE OR REPLACE NONEDITIONABLE TYPE sys.dbms_objects_utils_tsource AS
VARRAY(100) OF dbms_objects_utils_tselem;
/
Takes an array (nested table) of type name and invalidate them with status 6. This status will keep the spec timestamp when recompiling, thus keeping the dependencies valid.
This is used during upgrade/downgrade predominently and the only way to recompile a type with table dependents. Afterwards this will call utl_recomp.recomp_parallel to revalidate the invalidated types.
dbms_objects_apps_utils.recompile_types(
names IN dbms_objects_utils_tnamearr);
conn / as sysdba
CREATE OR REPLACE NONEDITIONABLE TYPE t_app_util AS
TABLE OF dbms_objects_utils_tname;
/
Splits the source$ entry for the latest version of the type to its CREATE and ALTERs and will return it in sources, with with the corresponding obj#.
The number or split sources will be the return value of the functions.
dbms_objects_apps_utils.split_source(
tschema IN CHAR,
tname IN CHAR,
sources OUT dbms_objects_utils_tsource)
RETURN NUMBER;
DECLARE
n NUMBER;
retArr dbms_objects_utils_tsource;
BEGIN
n := dbms_objects_apps_utils.split_source('SYS', 'T_APP_UTL', retArr);
dbms_output.put_line(TO_CHAR(n));
dbms_output.put_line(retArr.count);
FOR i IN 1 .. retArr.count LOOP
dbms_output.put_line(TO_CHAR(i) || ' : ' ||
TO_CHAR(retArr(i).objid) || ' : ' ||
retArr(i).source);
END LOOP;
END;
/
Takes in 2 schema names and for each type type present in both schemas will make any object column/table dependent on schema1.type1 point to schema2.type1.
Can also be used for updating just one type in schema1. In which case give the typename as the 3rd parameter. If you give NULL for typename it will default to the above behaviour.
dbms_objects_apps_utils.update_types(
schema1 IN VARCHAR2,
schema2 IN VARCHAR2,
typename IN VARCHAR2,
check_update IN BOOLEAN);