Monday 2 October 2017

How to compile invalid objects in an APPS Environment

https://dbissues.blogspot.com/2017/10/how-to-compile-invalid-objects-in-apps.html

Compiling Objects Manually Through SQL Commands

First find the Invalid Objects in the Database by below given query.

SELECT COUNT(*)
FROM DBA_OBJECTS
WHERE STATUS = ‘INVALID’;

For a more detailed query, use the following script :

SELECT OWNER, OBJECT_TYPE, COUNT(*)
FROM DBA_OBJECTS
WHERE STATUS = ‘INVALID’
GROUP BY OWNER, OBJECT_TYPE;

To recompile an individual object, connect to SQL*PLUS as the owner of the object (generally apps) and use oneof the following depending on the object type :

alter package <package_name> compile; (package specification)
alter package <package_name> compile body; (package body)
alter view <view_name> compile; (view)

If the object compiles with warnings, use either of the following to see the errors that caused the warnings :

show errors
OR
select * from user_errors where name = ‘<OBJECT_NAME>’;
Compiling Objects Through ADADMIN Utility

1. Login OS with APPS owner.

2. Start the ADADMIN Utility from the Unix prompt with this command :

$adadmin

3. Under the Maintain Applications Database Objects Menu, select Compile APPS schema(s)

No comments:

Post a Comment