begin declare procedure dyn_sql(p_sql in varchar2) is begin execute immediate p_sql; exception when others then return; end; begin --| --|drop packages and sequences --| --will not drop db links for now; might conflict with Repository DB Links --| --|drop packages and sequences --| begin for r in (select object_type, object_name from user_objects where object_type in ('PACKAGE', 'SEQUENCE') and (object_name like 'WMP%' or object_name like 'LIA%' )) loop dyn_sql('drop ' || r.object_type || ' ' || r.object_name); end loop; exception when others then return; end; end; end;