Synonym Designer

Use the Synonym Designer to create or modify synonyms. This section covers the following topics:

Starting the Synonym Designer

Start the Synonym Designer by using one of the following methods:

  • If you are creating a new synonym, in Server Explorer, right-click the Synonyms node and from the menu, select New Synonym.

  • If you are modify an existing synonym, in Server Explorer, double-click the node that represents the synonym, or right-click the node and select Edit from the menu.

The Synonym Designer appears similar to the following:

Using the Synonym Designer

In general, use the Synonym Designer to create or modify synonyms.

The Synonym Designer has the following controls:

Control Description

Schema name

Select from the list of available schemas in which to create this synonym.

Synonym name

Enter a name for the synonym.

The functional maximum length of the synonym name is 32 bytes. Names longer than 30 bytes are permitted for Java functionality only. If you specify a name longer than 30 bytes, Oracle Database encrypts the name and places a representation of the encryption in the data dictionary. The actual encryption is not accessible, and you cannot use either your original specification or the data dictionary representation as the synonym name.

Create as alias for local database object

Specifies the source object of the synonym from the current database. This setting creates a non-database link-based synonym. Settings are as follows:

  • Object type: Type of object, such Table, View, Function, Procedure, Package, Sequence, Synonym, Java class, public Synonym.

    The schema object cannot be contained in a package.

  • Schema name: Select the schema containing the object for which you are creating a synonym (source object).

  • Object name: Source object name for this synonym. Available choices are objects in the selected schema that are of the specified object type.

Create as alias for remote database object (DB Link)

Specifies a complete or partial database link (DB Link) so that you can create a synonym for a schema object located on a remote database. Note that you cannot specify a database link for a Java class synonym.

Settings are as follows:

  • Object type: Type of object, such Table, View, Function, Stored Procedure, and so on.

  • Schema name: Enter a name for the schema in the remote database.

  • Object name: Enter the source object name for this synonym.

Create as public

Specifies the synonym as a public synonym.

All users have access to public synonyms. However, each user must have appropriate privileges on the underlying object in order to use the synonym.

When resolving references to an object, Oracle Database uses a public synonym only if the object is not prefaced by a schema and is not followed by a database link.

If you do not select Create as public, the synonym is private and is accessible only within its schema. A private synonym name must be unique in its schema.

Preview SQL

Displays the CREATE SYNONYM SQL command code in a pop-up dialog box and in the output window. Read-only.

Save

Commits the synonym to the database. Alternatively, you can click the Save button in the Visual Studio .NET toolbar or select Save from the File menu.

See Also

Synonyms Node