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 |
To create a synonym:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Synonym.
Define the synonym:
Synonym Name - Enter a name.
Public or Private - Specify whether the synonym should be public or private.
Schema - Select the database schema (or username) which owns the object upon which you want to create your synonym.
Object - Enter the name of the object upon which you want to create a synonym.
Database Link - Enter the name of the database link to use if the synonym is to be create on a remote object.
Click Next.
A confirmation page appears. To view the SQL used to create the synonym, click Show SQL.
Click Finish.
To view a synonym:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Synonyms.
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 Status
Status