Abhijit,
Oracle has a script that re-compiles invalid objects, but I use my own script (below). This script takes care of a single schema; if you want to re-compile all 'INVALID' objects in the database, then you will want to access DBA_OBJECTS instead of USER_OBJECTS and prefix OBJECT_NAME with "...OWNER||'.'||OBJECT_NAME". Be sure to save the following code to a script (such as Recompile.sql) before you run it, otherwise the "SET ECHO OFF" does not take effect.
set pagesize 0
set feedback off
set echo off
spool temp.sql
select 'alter '||object_type||' '||object_name||' compile;'
from user_objects
where status = 'INVALID' and object_type not like '%BODY%'
/
spool off
set feedback on
prompt
prompt Created script, 'temp.sql'. Run that script to recompile Invalid objects.
prompt
Let me know if this is what you wanted.
Dave
Sandy, Utah, USA @ 17:40 GMT, 10:40 Mountain time