Prerequisites
To create a private database link, you must have CREATE DATABASE LINK system privilege. To create a public database link, you must have CREATE PUBLIC DATABASE LINK system privilege.

You must have CREATE SESSION privilege on the remote Oracle database.
Sys or system.

Net8 must be installed on both the local and remote Oracle databases.

To access non-Oracle systems you must use the Oracle Heterogeneous Services.


CURRENT_USER Example
The following statement defines a current-user database link:

CREATE DATABASE LINK sales.hq.acme.com
CONNECT TO CURRENT_USER
USING 'sales';

Fixed User Example
The following statement defines a fixed-user database link named SALES.HQ.ACME.COM:

CREATE DATABASE LINK sales.hq.acme.com
CONNECT TO scott IDENTIFIED BY tiger
USING 'sales';

Once this database link is created, you can query tables in the schema SCOTT on the remote database in this manner:

SELECT *
FROM [email protected];