Skip to content

08. Database link

eshan3101 edited this page Jul 28, 2026 · 3 revisions

1] A Database Link (DB Link) in Oracle is an object that allows one database to access objects (tables, views, procedures, etc.) in another Oracle database as if they were local.

2]Think of it as a bridge that connects two Oracle databases so that one database can access objects in another database.

3] Database A Database B

 User: SCOT                       User: HR
 EMP table                       EMPLOYEES table

A Database Link creates a connection between them. Database Link Database A -----------------------> Database B

TERMINAL 1 image

image image

TERMINAL 2 SOURCE DATABASE

image

TERMINAL 3 TARGET DB

image

Create DB Link │ ▼ Oracle checks tnsnames.ora │ ▼ Finds service name (PROD) │ ▼ Listener receives request │ ▼ Listener connects to PROD database │ ▼ SCOTT logs in │ ▼ Runs: SELECT SYSDATE FROM DUAL │ ▼ Returns result to local database

Clone this wiki locally