Examples of copying synonyms

These examples show the DDL that is generated when you copy synonyms between heterogeneous databases.

The generated DDL is shown on the Preview DDL page in the Paste Database Objects wizard.

Table 1 shows an example of the DDL that is generated for copying synonyms from an Oracle Database 11g source database to a DB2® Version 9.7 for Linux®, UNIX®, and Windows® target database.

Table 1. Example of copying synonyms from Oracle Database 11g to DB2 Version 9.7 for Linux, UNIX, and Windows database
Oracle Database 11g synonym definition Generated DDL for DB2 Version 9.7 database
CREATE SYNONYM SCOTT.Orders_syn
   FOR SCOTT.Orders;
CREATE ALIAS Orders_syn
   FOR Orders;

Table 2 shows an example of the DDL that is generated for copying an alias from a DB2 Version 9.7 for Linux, UNIX, and Windows source database to an Oracle Database 11g target database. Aliases are also known as synonyms.

Table 2. Example of copying an alias from DB2 Version 9.7 for Linux, UNIX, and Windows database to Oracle Database 11g
DB2 Version 9.7 database alias definition Generated DDL for Oracle Database 11g
CREATE ALIAS MANAGER_INFO_synonym
   FOR MANAGER_INFO; 
Note: MANAGER_INFO is a view.
CREATE SYNONYM MANAGER_INFO_synonym
   FOR MANAGER_INFO;

Feedback