PL/SQL:database links
程序员文章站
2022-05-05 11:34:57
...
1 在被连接的数据库上,查看监听配置文件
2 tnsnames.ora
3 复制所需要连接用户的DESCRIPTOIN
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
4 在连接的数据库上,新增database links
5 选择需要的信息,数据库的内容为上述的DESCRIPTOIN,也可以间写为:localhost:1521/orcl
6 创建database links对应的sql语句
-- Create database link
create database link dblink_scott
connect to scott identified by tiger
using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)))';
7 测试
上一篇: CAS实现SSO单点登录
下一篇: 内心戏很足是种什么样的体验?