Latest Updates

Post Top Ad

21 June, 2013

How to create Oracle Database Link


Definition:
In Oracle PL/SQL, the CREATE DATABASE LINK statement creates a schema object in one database that enables you to access objects on another database.

(The other database does not have be an Oracle Database system, but if you intend to access non-Oracle systems you'll need to use Oracle Heterogeneous Services.)

Example Syntax:


CREATE [PUBLIC] DATABASE LINK <link_name>

CONNECT TO <user_name>

IDENTIFIED BY <password>

USING '<service_name>';


Example Usage:

CREATE DATABASE LINK test 
   CONNECT TO piyush IDENTIFIED BY piyush
   USING 'test';


In the example above, user piyush on the remote database defines a fixed-user database link named test to the piyush schema on the local database.

No comments:

Post Top Ad

Your Ad Spot

Pages