C.2 Accessing the Gateway Data Dictionary

Accessing a gateway data dictionary table or view is identical to accessing a data dictionary in an Oracle database.

You issue a SQL SELECT statement specifying a database link. The Oracle database data dictionary view and column names are used to access the gateway data dictionary in an Oracle database. Synonyms of supported views are also acceptable. For example, the following statement queries the data dictionary table ALL_CATALOG to retrieve all table names in the Sybase database:

SQL> SELECT * FROM "ALL_CATALOG"@SYBS;

When a data dictionary access query is issued, the gateway:

  1. Maps the requested table, view, or synonym to one or more Sybase system table names. The gateway translates all data dictionary column names to their corresponding Sybase column names within the query. If the mapping involves one Sybase system table, the gateway translates the requested table name to its corresponding Sybase system table name within the query. If the mapping involves multiple Sybase system tables, the gateway constructs a join in the query using the translated Sybase system table names.
  2. Sends the translated query to Sybase.
  3. Might convert the retrieved Sybase data to give it the appearance of the Oracle database data dictionary table.
  4. Passes the data dictionary information from the translated Sybase system table to the Oracle database.

    Note:

    The values returned when querying the gateway data dictionary might not be the same as the ones returned by the Oracle SQL*Plus DESCRIBE command.