set heading off
set feedback off
set verify off
set linesize 128
accept owner prompt 'Esquema? '
spool all_syns.sql
prompt define owner="&OWNER"
prompt set verify off
select 'CREATE PUBLIC SYNONYM '||object_name||' FOR &'||'OWNER..'||object_name||';'
   from all_objects
   where owner='&owner'
     and object_type in ('FUNCTION','LIBRARY','PACKAGE','PROCEDURE','SEQUENCE',
                         'TABLE','VIEW');
prompt set verify on
spool off
set heading on
set feedback on
set verify on
