Criar SYNONYM para múltiplos objetos.

SET HEADING OFF
set FEEDBACK OFF
set pagesize 10000;
SET VERIFY OFF
set lines 300
 
SELECT  'CREATE OR REPLACE PUBLIC SYNONYM ' || ob1.object_name || ' FOR ' || ob1.owner ||'.'|| ob1.object_name||';'
      FROM all_objects ob1
     WHERE ob1.owner in ('DBAASS')
       AND ob1.object_type in ( 'FUNCTION','MATERIALIZED VIEW','PROCEDURE'
                          ,'SEQUENCE','TABLE','VIEW','PACKAGE')
 
spool /tmp/create_synonym01.sql
/
spool off
SQL

Leave a Reply

Your email address will not be published. Required fields are marked *

search previous next tag category expand menu location phone mail time cart zoom edit close