Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: invalid procedure/trigger

Re: invalid procedure/trigger

From: Djordje Jankovic <djordjej_at_rogers.com>
Date: Wed, 08 Jan 2003 20:33:52 -0800
Message-ID: <F001.0052AF71.20030108203352@fatcity.com>


To check for invalid objects:
select object_type, owner, object_name
  from dba_objects
 where object_type in ('PACKAGE','PACKAGE BODY','PROCEDURE','FUNCTION')    AND OWNER IN ('MyOwner1','MyOwner2')
   and status = 'INVALID'

  order by decode(object_type,'PACKAGE',0,

'PACKAGE BODY',1,
'FUNCTION', 2,
'PROCEDURE',3,
'TRIGGER',4
5), owner, object_name; To create sql to recompile the invalid ones: select 'alter ' || decode(object_type,'PACKAGE BODY','package',lower(object_type)) || ' ' || owner||'.'||object_name || ' compile ' || decode(object_type,'PACKAGE BODY','body;',';')
  from dba_objects
 where object_type in ('PACKAGE','PACKAGE BODY','PROCEDURE','FUNCTION')    AND OWNER IN ('MyOwner1','MyOwner2')
   and status = 'INVALID'
  order by decode(object_type,'PACKAGE',0,

'PACKAGE BODY',1,
'FUNCTION', 2,
'PROCEDURE',3,
'TRIGGER',4
5), owner, object_name; Djordje ----- Original Message -----

  From: shuan.tay(PCI¾G¸R³Ô)
  To: Multiple recipients of list ORACLE-L   Sent: Wednesday, January 08, 2003 9:58 PM   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.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Djordje Jankovic
  INET: djordjej_at_rogers.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Jan 08 2003 - 22:33:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US