在三个实例 oracle 之间创建数据库 link
Create database link between three instances oracle
如何在三个实例之间创建数据库link?
例如,我有一个名为 orcl、orcl1、orcl2 的数据库,如何 link 它们?
谢谢
以下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';
如何在三个实例之间创建数据库link? 例如,我有一个名为 orcl、orcl1、orcl2 的数据库,如何 link 它们? 谢谢
以下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';