Translate

Wednesday, April 24, 2013

Checking for invalid objects and missing package bodies


Checking for invalid objects and missing package bodies 


Example for GME Invaild Objects, this Query can also be used to find other invalid objects also :

Change the Object_name for other package.

If you encounter the error "cannot find the program unit called", or any error stating invalids or missing packages encountered. Any condition where you might suspect invalid objects or package bodies might be related or causing a problem.
The scripts do no updates to the database they only read and report data!
The Query below checks and reports on invalid objects under OPM Process Execution (GME), you can change GME to any product you want to check.
SELECT object_name
FROM all_objects
WHERE object_name like 'GME%'
AND status = 'INVALID';
The Query below checks and reports on invalid Package Bodies under OPM Oracle Process Manufacturing Process Execution (GME), you can change GME to any product you want to check.
SELECT object_name
FROM all_objects obj
WHERE object_name like 'GME%'
AND object_type = 'PACKAGE'
AND not exists (SELECT 1 FROM all_objects
WHERE object_name = obj.object_name
AND object_type = 'PACKAGE BODY');

No comments:

Post a Comment