Create database links
- Last UpdatedJan 04, 2023
- 1 minute read
- PI System
- PI SQL Client ODBC 2021
- Developer
Any Oracle client that is connected to the Oracle database can access an ODBC data source through the gateway. The Oracle client and the Oracle database can reside on different machines. The gateway accepts connections only from the Oracle database.
To access the ODBC data source, you must create a database link. A public database link is the most common of database links.
Connect to SQL*Plus as if you are connecting to your regular database. At the SQL prompt, create a new database link.
For example:
CREATE PUBLIC DATABASE LINK pi
CONNECT TO "Administrator" IDENTIFIED BY "password"
USING 'pi';
The command creates an Oracle database link named pi, referencing the pi entry in tnsnames.ora.
Note: It is also possible to create private database links. For details consult the Oracle Database SQL Language Reference, CREATE DATABASE LINK statement.