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.
Creating a Database Link
Create a database link using Object Browser.
To create a database link:
-
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.
-
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.
-
Connect To Schema - Enter the name of the database schema on the remote system to access. Note that the schema name is case-sensitive.
-
Password - Enter the password for the remote database schema.
-
Remote Hostname or IP - Enter the hostname or IP address of the database server you wish to access.
-
Remote Host Port - Enter the network port number on which the Oracle Net Listener is accepting requests. This is typically
1521. -
Identified by - Choose how you want to identify the remote database. Select Service Name or SID.
-
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.
-
-
Click Create Database Link.
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:
-
In Object Browser, Object Tree, expand Database Links and select a database link.
-
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
-
-
Dropping a Database Link
Select a database link from the Object Tree and click Drop.
To drop a database link:
-
In Object Browser, Object Tree, expand Database Links and select a database link.
-
Click the Object Details tab and then Drop.
In the Drop dialog:
-
Drop - Review the details.
-
SQL - Displays the SQL generated to drop the database link. To copy the displayed SQL, click the Copy icon.
-
To confirm your selection, click Drop again.
-