Wednesday, May 15, 2013

Create Oracle Database Link.

A database link is a schema object in one database that enables you to access objects on another database.

1. Database link using TNS

CREATE PUBLIC DATABASE LINK "REMOTDB"
 CONNECT TO HR
 IDENTIFIED BY HR
 USING 'TESTDB';

 Public Database Link For Access All Database User.

CREATE DATABASE LINK REMOT
CONNECT TO scott IDENTIFIED BY tiger
USING 'TESTDB';

 Private Database Link For Fixed Database User.

2. Database link Without Using TNS.

CREATE PUBLIC DATABASE LINK MICRDB
 CONNECT TO MICR
 IDENTIFIED BY MICR
 USING '10.11.201.153:1521/ORCL';

1 comment: