Oracle建立DBLink相关命令

单节点:

/*drop public database link xx_link;*/

create public database link xx_link
       connect to xx_user identified by xx_user 
       using ' (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.2)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XXXX)
    )
  )';

双节点:

/*drop public database link xx_link;*/

create public database link xx_link
connect to xx_user identified by xx_user 
using '(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.0.1.92)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.0.1.93)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME =PROD)
)
)';

发表回复

您的电子邮箱地址不会被公开。