select 'drop '||decode (s.owner,'PUBLIC','PUBLIC SYNONYM ',

'SYNONYM'||s.owner||'.')||s.synonym_name||';'

from dba_synonyms  s

where table_owner not in('SYSTEM','SYS')

and db_link is null

and not exists

     (select  1

      from dba_objects o

      where s.table_owner=o.owner

      and s.table_name=o.object_name)

/


drop PUBLIC SYNONYM SDO_AVAILABLE_ELEM_OPS;
drop PUBLIC SYNONYM HHIDLROWS;
drop PUBLIC SYNONYM SDO_TO_HVALUE;
drop PUBLIC SYNONYM SDO_TO_DATE;
drop PUBLIC SYNONYM SDO_TO_BVALUE;
drop PUBLIC SYNONYM SDO_LATLONTOCODE;
drop PUBLIC SYNONYM SDO_HVALUETODIM;
drop PUBLIC SYNONYM SDO_ENCODE;
drop PUBLIC SYNONYM SDO_DECODE;
drop PUBLIC SYNONYM SDO_DATETODIM;
drop PUBLIC SYNONYM SDO_COMPARE;
drop PUBLIC SYNONYM SDO_TO_LON;
drop PUBLIC SYNONYM SDO_TO_LAT;
drop PUBLIC SYNONYM SDO_BVALUETODIM;
drop PUBLIC SYNONYM HHNEIGHBOUR;
drop PUBLIC SYNONYM HHLINEOR;
drop PUBLIC SYNONYM HHIDROWS;
drop PUBLIC SYNONYM HHBITS;
drop PUBLIC SYNONYM HHLINEPS;

SQL> @utlprp.sql 0

OBJECTS WITH ERRORS
-------------------
                131

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0