![]() I tried removing the exclusion clauses for VIEW, but I got the same error. IF v_counter <= 100 - Failsafe: exit while loop if the objects cannot be recompiled after 100 triesįOR cur_invalid_objects_rec IN cur_invalid_objectsĭbms_ddl.alter_compile(cur_invalid_objects_rec.object_type,NULL,cur_invalid_objects_rec.object_name) ĭbms_output.put_line('Unable to recompile objects to a status of: VALID. For example if pkga references viewb then the release looks like: 1 2 3 4 5. Burleson is the American Team Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals. #ORACLE RECOMPILE INVALID OBJECTS HOW TO#*** exclude VIEW and MATERIALIZED VIEW object typesĪnd object_type NOT IN ('VIEW','MATERIALIZED VIEW') ĪND object_type NOT IN ('VIEW','MATERIALIZED VIEW') How to Compile all Invalid Objects in Oracle When reviewing a team’s release processes I commonly encounter developers spending a lot of time and concern over the order of their PL/SQL objects (i.e. Oracle invalid objects sometimes have dependencies, so it may be necessary to run the Oracle invalid objects recompile repeatedly. I can change it to use pileschema if it supports TYPE objects, otherwise restrict my query to the supported object types. ORA-06512: at "SYS.DBMS_UTILITY", line 156Ĭould it be something to do with the fact that we've just created a load of editioning views for edition-based redefinition? Thanks, it turned out that the reason this script wasn't working was that one of the invalid objects was a TYPE object - which as you say is not supported by DBMSDDL.ALTERCOMPILE. This was working fine, but now we see the following error: ORA-04047: object specified is incompatible with the flag specified Get Invalid Objects of Current User in Oracle To get the list of invalid objects for the current logged in user, run the following SQL query: Select objectname, objecttype, created, lastddltime From userobjects Where status 'VALID' The output would the database objects which are invalid. Maintain Applications Database Entities menu. Compile/Reload Applications Database Entities menu. As part of a database build, we have some sql which recompiles all invalid objects in the DB. Option 1 - Use 'adadmin' utility to recompile all invalid objects in the database Generate Applications Files menu. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |