"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible.
I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Utilities for working with user defined 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.
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.
tschema IN CHAR,
tname IN CHAR,
sources OUT dbms_objects_utils_tsource)
n := dbms_objects_apps_utils.split_source('SYS', 'T_APP_UTL', retArr);
FOR i IN 1 .. retArr.count LOOP
dbms_output.put_line(TO_CHAR(i) || ' : ' ||
TO_CHAR(retArr(i).objid) || ' : ' ||
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.
schema1 IN VARCHAR2,
schema2 IN VARCHAR2,
typename IN VARCHAR2,
check_update IN BOOLEAN);