plsql 怎么建立dblink
2个回答
展开全部
语法如下:
create public database link dblinkname connect to username identified by password
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = database_ip)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME =servicename)
)
)';
其中username 是用户名 , password是数据库的密码,database_ip是数据库ip地址,servicename是服务名。
create public database link dblinkname connect to username identified by password
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = database_ip)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME =servicename)
)
)';
其中username 是用户名 , password是数据库的密码,database_ip是数据库ip地址,servicename是服务名。
展开全部
1.建立DBLINK语句:
CREATE DATABASE LINK ccc
CONNECT TO user IDENTIFIED BY password
USING '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 20.10.4.18 )(PORT = 1521))
(load_balance=no)(failover=yes)
)
(CONNECT_DATA =
(SERVICE_NAME = orcl )
)
)';
2.查询使用语法:
select * from table1@ccc;
CREATE DATABASE LINK ccc
CONNECT TO user IDENTIFIED BY password
USING '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 20.10.4.18 )(PORT = 1521))
(load_balance=no)(failover=yes)
)
(CONNECT_DATA =
(SERVICE_NAME = orcl )
)
)';
2.查询使用语法:
select * from table1@ccc;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询