Your browser does not support JavaScript. This help page requires JavaScript to render correctly.
Skip Headers
Previous
Previous
 
Next
Next

Validating (Compiling) Invalid Schema Objects

As a database administrator (DBA), you may be asked to revalidate schema objects that have become invalid. Schema objects (such as triggers, procedures, or views) might be invalidated when changes are made to objects on which they depend. For example, if a PL/SQL procedure contains a query on a table and you modify table columns that are referenced in the query, then the PL/SQL procedure becomes invalid. You revalidate schema objects by compiling them.

Note: It is not always possible to revalidate a schema object that stores program code by compiling it. You may have to take remedial actions first. For example, if a view becomes invalid because a table that it references is deleted, then compiling the view produces an error message that indicates that the table does not exist. You cannot validate the view until you re-create the table or retrieve it from the recycle bin.

Database Control notifies you when schema objects become invalid by displaying an alert in the Alerts section of the Database Home page.

There are two ways to display schema objects that require validation: by following an alert on the Database Home page, or by viewing the appropriate object page (Views page, Procedures page, and so on) and searching for the objects.

To validate schema objects starting from an alert:

  1. Go to the callbackDatabase Home page, logging in as user SYSTEM.

    See "Accessing the Database Home Page".

  2. In the Alerts section, search for alerts with the following message:

    n object(s) are invalid in the schema_name schema.
    

    An example of such a message is the following:

    4 object(s) are invalid in the HR schema.
    

    There is a separate message for each schema that contains invalid objects.

  3. In the Message column, click an invalid object message.

    The Owner's Invalid Object Count page appears.

  4. Under Related Links, click Invalid Objects Details.

    The Invalid Object Details page appears, showing a list of invalid objects.

  5. Select one or more objects, and then click Recompile.

    A confirmation message appears, and the newly validated objects are removed from the list.

To validate a schema object starting from an object page:

  1. Go to the callbackDatabase Home page, logging in as user SYSTEM.

    See "Accessing the Database Home Page".

  2. At the top of the page, click Schema to view the Schema subpage.

  3. In the Database Objects section, click the link for the object type to validate.

    For example, to validate a view, click Views.

  4. On the object page (for example, the Views page), enter a schema name and, optionally, an object name or partial object name, and then click Go.

    The schema objects are displayed.

  5. Select the schema object to validate.

  6. In the Actions list, select Compile, and then click Go.

    A confirmation message appears.

Related Topics

Oracle Database Concepts for more information about schema object dependencies

Oracle Database Administrator's Guide for information about managing object dependencies

Managing Program Code Stored in the Database