Ниже приведен SQL, который может быть вам полезен:)
В базе данных 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';
В базе данных 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';
В базе данных 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';