Managing Database Links

A database link is a schema object in one database that enables you to access objects in another database. You can create, browse, drop a database link and view report.

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.

Creating a Database Link

Create a database link using Object Browser.

To create a database link:

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

    Object Browser appears.

  2. Click the Create icon.
  3. From the list of object types, select Database Link.
  4. For Define :
    1. Database Link Name - Enter 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.

    2. Connect To Schema- Enter the name of the database schema on the remote system to access.

    3. Password - Enter the password for the remote database schema.

    4. Remote Hostname or IP - Enter the hostname or IP address of the database server you wish to access.

    5. Remote Host Port - Enter the network port number on which the Oracle Net Listener is accepting requests. This is typically 1521.

    6. Identified by - Select Service Name or SID.

      If you select SID (Oracle System Identifier), enter the SID name if the remote database is identified by a SID. If you select Service Name, enter the service name if the remote database is identified by a service name.

  5. Click Next.
  6. Click Create Database Link.

Browsing a Database Link

Select a database link from the Object Selection pane and view different reports about the database link.

To browse a database link:

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

    Object Browser appears.

  2. From the Object list, select Database Links.
  3. From the Object Selection pane, select a database link.

    The Object Details view appears.

  4. Click the tabs at the top of the page to view different reports about the database link.

Reports for Database Links

Alternative views available when viewing a database links in Object Browser.

Table 2-11 describes all available reports for database links.

Table 2-11 Available Reports for Database Links

View Description

Object Details

(Default) Displays details about the database link. Actions you can perform include:

  • Drop - Deletes the database link

  • Test - Tests the database link

Dependencies

Displays a list of objects that use (or depend) upon this database link.

SQL

Displays the SQL necessary to re-create this database link.

Dropping a Database Link

Select a database link from the Object Selection pane and click Drop.

To drop a database link 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 Database Links.
  3. From the Object Selection pane, select a database link.

    The Object Details View appears.

  4. Click Drop.
  5. To confirm, click Finish.