Using Oracle Synonyms

Starting with Version 3.5, the SilverStream Application Server provides support for Oracle 8 synonyms for tables and views: You can now see synonyms for tables and views in the SilverStream Designer's list of tables.

NOTE   With Oracle 8, you can also define synonyms for other kinds of objects, including object tables, object views, and stored procedures. SilverStream supports synonyms only for tables and views.

Specifying the driver

The default SilverStream driver set for Oracle 8--SilverStream JDBC driver--does not support synonyms.

In order to enable synonym support, you need to specify the driver set SilverStream JDBC driver with synonym/mixed case support when adding the Oracle 8 database to the SilverStream server.

Once you have chosen this driver set for an Oracle 8 database, synonyms defined for tables and views are displayed in the Designer's list of tables, as long as you have access to the synonyms, as described next.

Types of synonyms

Synonyms can be either private or public. A public synonym is owned by the special user group PUBLIC; every user of a database can access it.

A private synonym is in the schema of a specific user, who has control over its availability to others (see the Oracle manual Oracle 8 Release 8.0 Concepts, Volume 1, page 8-16). Individual users can see only the public synonyms and their private synonyms.

How synonyms behave

A synonym that displays in the table list behaves exactly like its underlying table or view, because support for synonyms is built into the JDBC method calls, which access the underlying tables and views to retrieve the required information.

The following JDBC implementation methods now have synonym support built in: getTables, getTableTypes, getTablePrivileges, getColumnPrivileges, getPrimaryKeys, getImportedKeys, getExportedKeys, getCrossReference, and getIndexInfo.

Enabling and disabling synonym support

There is a property called includeSynonyms in the platforms.dbl file in the SilverStreamInstallDir/Resources directory that specifies whether a driver supports synonyms. The property is in the PROPERTIES section for the driver.

By default, the property is set to true for SilverStream JDBC driver with synonym/mixed case support.

  /Name ... 
  /JdbcDriver ... 
  /DriverSet ... 
  /includeSynonyms       "true" 

If you want to use this driver, but want synonym support disabled, set includeSynonyms to false.

Similarly, if you have written your own Oracle 8 driver and have implemented synonym support, to enable the support you need to set the includeSynonyms property to true in the PROPERTIES section for your driver.

Copyright © 2000, SilverStream Software, Inc. All rights reserved.