Create database link

语法说明:

create public database link

connect to <被连接库的用户名> identified by <被连接库的密码>

using '';


即 :

create public database link DBLink名称

connect to <被连接库的用户名> IDENTIFIED BY <被连接库的密码>

using '( DESCRIPTION =
(ADDRESS_LIST=(ADDRESS =(PROTOCOL = TCP)(HOST = 被连接库的IP地址)(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = 数据库服务名))
)';


工作使用例子:

--Create database link
create database link xxx
connect to xxx identified by xxx
using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 2261)))(CONNECT_DATA =(SERVICE_NAME = xxx)))';

你可能感兴趣的:(Create database link)