How to check invalid objects and compile them.



How to check invalid objects and compile them.


1- Check invalid objects

set linesize 120
set pagesize 100
col owner format a15
col object_type format a30
col object_name format a30
SELECT owner, object_type, object_name, status
from dba_objects
WHERE status <> 'VALID'
order by owner, object_type, object_name;


2- Check Oracle components valid status objects

@$ORACLE_HOME/rdbms/admin/utlrp.sql


set linesize 300
col COMP_NAME format a40
col VERSION format a14
col STATUS format a10
select COMP_NAME,VERSION,STATUS
from dba_registry;


3- Compile all database objects.

3.1 sqlplus "/ as sysdba"
3.2 @$ORACLE_HOME/rdbms/admin/utlrp.sql


Comments