Sunday, June 22, 2008

generate 'create or replace public synonym' statement after export oracle database

SELECT 'CREATE or replace PUBLIC SYNONYM ' || synonym_name || ' FOR '|| table_owner || '.' || table_name || ';' cmd FROM dba_synonyms WHERE TABLE_OWNER in ('A','B','C') and owner='PUBLIC';

1 comment:

coprat-kb said...

have you got any idea how to create a master view type synonym? I have created a view (say MYVIEW) for each domains and I have created a public synonym for each of the domain level view. Meaning I have (example)domain1MYVIEW, domain2MYVIEW, domain3MYVIEW and so on.
How will I create a master view (say MASTER_MYVIEW) ?
Please advise or alternative of doing the above.