How to view invalidated objects in PL/SQL?

To view PL/SQL invalid objects, you can use one of the following methods:

  1. Utilize the DBA_OBJECTS view:
    Use the following SQL query statement:
  2. Retrieve all records from the table DBA_OBJECTS where the status is ‘INVALID’.
  3. This will retrieve all objects with a status of “INVALID,” including PL/SQL programs, packages, procedures, functions, etc.
  4. Utilize the DBA_ERRORS view:
    Execute the following SQL query:
  5. Retrieve all records from the DBA_ERRORS table where the OWNER is equal to ‘SCHEMA_NAME’ and the STATUS is equal to ‘INVALID’.
  6. Replace “SCHEMA_NAME” with your schema name. This will return error information for all PL/SQL objects in the specified schema that have a status of “INVALID”.
  7. 使用PL/SQL编译器:
    在PL/SQL开发工具中,比如Oracle SQL Developer,可以使用编译器来检查失效对象。只需打开需要检查的PL/SQL对象,如存储过程或函数,尝试编译它们,如果有任何编译错误,说明对象失效。

No matter what method you use, it can help you view the dysfunctional PL/SQL objects.

bannerAds