Managing Synonyms

A synonym is an alias for a schema object. Synonyms can provide a level of security by masking the name and owner of an object and by providing location transparency for remote objects of a distributed database. Also, they are convenient to use and reduce the complexity of SQL statements for database users.

Topics:

See Also:

Oracle Database Administrator's Guide for information about synonyms

Creating Synonyms

To create a synonym:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. Click Create.

  3. From the list of object types, select Synonym.

  4. Define the synonym:

    1. Synonym Name - Enter a name.

    2. Public or Private - Specify whether the synonym should be public or private.

    3. Schema - Select the database schema (or user name) which owns the object upon which you want to create your synonym.

    4. Object - Enter the name of the object upon which you want to create a synonym.

    5. Database Link - Enter the name of the database link to use if the synonym is to be created on a remote object.

    6. Click Next.

    A confirmation page appears, which displays the SQL used to create the synonym.

  5. Click Create Synonym.

Viewing a Synonym

To view a synonym:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. From the Object list, select Synonyms.

  3. From the Object Selection pane, select a synonym.

    The Object Details view appears displaying the following:

    • Synonym Owner

    • Synonym Name

    • Object Owner

    • Object Name

    • Object Type

    • Status

Dropping a Synonym

To drop a synonym in Object Browser:

  1. On the Workspace home page, click SQL Workshop and then Object Browser.

    Object Browser appears.

  2. From the Object list, select Synonyms.

  3. From the Object Selection pane, select a synonym and click Drop.

  4. To confirm, click Finish.