--creates a quick scipt for listing the errors for objects that don't compile

-- PORTFOLOIO ¤ WHITE PAPERS ¤ HOME PAGE


SELECT  /* ©2004 by Edward Stoever,  */  
          'ALTER '
       || DECODE(object_type,'PACKAGE BODY','PACKAGE',object_type)
       || ' '
       || owner
       || '.'
       || object_name
       || ' COMPILE'
       || DECODE(object_type,'PACKAGE BODY',' BODY',NULL)
	   ||';'
       || CHR (10)
       || 'SELECT text FROM sys.dba_errors WHERE owner='''
       || owner
       || ''' AND name ='''
       || object_name
       || ''';'
  FROM dba_objects
 WHERE status = 'INVALID';