How to create database link between three instances? For eg i have database named orcl,orcl1,orcl2 how to link them? Thanks
-
1It's too broad question. Can you describe what you are actually want to achieve as how to create database link really easy to find out from Oracle docsoreh– oreh2018-05-10 14:45:09 +00:00Commented May 10, 2018 at 14:45
-
It's not much complexity to find out on google, but still, I have posted an answer below you can check out. :)user8406805– user84068052018-05-10 15:23:25 +00:00Commented May 10, 2018 at 15:23
Add a comment
|
1 Answer
These are the below SQL that might be helpful to you :)
At database ORCL:
CREATE DATABASE LINK db_link_orcl1
CONNECT TO orcl1_user_name IDENTIFIED BY orcl1_user_password
USING 'localhost:1521/orcl1';
CREATE DATABASE LINK db_link_orcl2
CONNECT TO orcl2_user_name IDENTIFIED BY orcl2_user_password
USING 'localhost:1521/orcl2';
At database ORCL1:
CREATE DATABASE LINK db_link_orcl
CONNECT TO orcl_user_name IDENTIFIED BY orcl_user_password
USING 'localhost:1521/orcl';
CREATE DATABASE LINK db_link_orc2
CONNECT TO orcl2_user_name IDENTIFIED BY orcl2_user_password
USING 'localhost:1521/orcl2';
At database ORCL2:
CREATE DATABASE LINK db_link_orcl
CONNECT TO orcl_user_name IDENTIFIED BY orcl_user_password
USING 'localhost:1521/orcl';
CREATE DATABASE LINK db_link_orcl1
CONNECT TO orcl1_user_name IDENTIFIED BY orcl1_user_password
USING 'localhost:1521/orcl1';