3.12 Managing Database Links

A database link is a schema object in one database that enables you to access objects in another database. Use Object Browser to create, browse, or drop a database link.

Once you create a database link, you can access the remote objects by appending @dblink to the table or view name, where dblink is the name of the database link.

3.12.1 Creating a Database Link

Create a database link using Object Browser.

To create a database link:

  1. In Object Browser, click the Create Database Objects menu and select Database Link.

    Tip:

    To create new objects from the Object Tree, right-click the object and select the Create option.

    The Create Procedure Wizard appears.

  2. Database Link Name - Identifies the name of the database link. Database link names must conform to Oracle naming conventions and cannot contain spaces, or start with a number or underscore.
  3. Connect To Schema - Enter the name of the database schema on the remote system to access. Note that the schema name is case-sensitive.
  4. Password - Enter the password for the remote database schema.
  5. Remote Hostname or IP - Enter the hostname or IP address of the database server you wish to access.
  6. Remote Host Port - Enter the network port number on which the Oracle Net Listener is accepting requests. This is typically 1521.
  7. Identified by - Choose how you want to identify the remote database. Select Service Name or SID.
  8. SID or Service Name - What you enter here depends upon your selection in Identified by.
    • If Identified by is set to SID, enter the SID (Oracle System Identifier) name.

    • If for Identified by is set to Service Name, enter the service name.

  9. Click Create Database Link.

3.12.2 Viewing a Database Link

Select a database link from the Object Tree and access tabs in the Object Detail View.

To browse a database link:

  1. In Object Browser, Object Tree, expand Database Links and select a database link.
  2. The Object Detail View appears and displays the following tabs:
    • Object Details - Displays details about the database link. Available actions include:
      • Drop
      • Test
      • Refresh
    • Synonyms - Displays synonyms for this object. Available actions: Refresh.
    • DDL - Displays the DDL necessary to re-create this database link.

      Available actions include:

      • Download
      • Refresh

3.12.3 Dropping a Database Link

Select a database link from the Object Tree and click Drop.

To drop a database link:

  1. In Object Browser, Object Tree, expand Database Links and select a database link.
  2. Click the Object Details tab and then Drop.

    In the Drop dialog:

    1. Drop - Review the details.
    2. SQL - Displays the SQL generated to drop the database link. To copy the displayed SQL, click the Copy icon.
    3. To confirm your selection, click Drop again.