- 1). Open the Oracle Enterprise Manager application from the Windows program menu and log in to your database server.
- 2). Open the PL-SQL editor and create the database linking code. The following code shows you the syntax for the Oracle link:
CREATE PUBLIC DATABASE LINK anotherserver
In this example, Oracle connects to the server named "anotherserver," and the link's name is set to "Oracle2." Click "Run" to create the link.
- 3). Query the remote server. After the link is created, you use the new link name to query the remote database. The following code shows you how to query a remote server linked by Oracle:
select * from customers@Oracle2
The code above queries the "customers" table on the linked Oracle2 database. The customer returned has the ID of 1.