Hi Shuan,
 
Have known the Third party of oracle from Quest Software , The product name is TOAD. Using this application you can check the valid or invlaid the procedure and also you can recompile it. Or, you can create the script to check function, procedure,view,and trigger from table dba_objects.
 
        set termout off
        set feed off
        set heading off
        set echo off
        set verify off
        set linesize 180
        set pagesize  0
 
        spool alter_all_invalid_list.sql
 
        select 'promp '|| object_name||chr(10)||'ALTER '|| decode( OBJECT_TYPE,'PACKAGE BODY','PACKAGE',OBJECT_TYPE) ||' ' ||object_name||' COMPILE;'  
        from user_objects
        where status ='INVALID'
        and upper(object_name) != 'DEBUG'
        order by object_type, object_name;
 
        prom exit
 
        spool off
 
        exit
 
 
And create the batch file :
    sqlplus username/password @alter_a;;_invalid_list.sql
 
The script above you can run anytime or you can put into the scheduller which running every night.
 
 
Thank's
 
Bernardus Deddy Hoeydiono.
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of shuan.tay(PCI鄭祺勛)
Sent: Thursday, January 09, 2003 9:59 AM
To: Multiple recipients of list ORACLE-L
Subject: invalid procedure/trigger

Dear all DBAs,
 
Is there any way to check whether the procedures or triggers is valid?
and if it's not valid, recompile it automatically.
Some of the DBAs here always forgot to check procedures/triggers after modify table.
 
Thanks in advance.

Reply via email to