如何使用dblink连接Oracle的两个数据库
我尝试使用 db link,因为我首先将两个数据库的名称更改为 sol1(远程)和 sol3(本地),然后
在 sol3
CREATE DATABASE LINK SOL1.SWORLD
CONNECT TO TEST IDENTIFIED BY TEST USING SOL1;
LINK CREATED
ON SQL /> SELECT * FROM [email protected]
消息上创建一个 db 链接:
SQL 无法解析服务名称
然后我删除了数据库链接并从 Oracle 企业模式管理器创建了一个链接 我创建了固定用户的公共链接。登录和密码后,我在服务选项卡中将名称添加为 sol1
当我测试连接消息时出现
链接无效
I am tring to use db link for that I have first change the name of both databases to sol1(remote) and sol3(local) then I create a db link
On sol3
CREATE DATABASE LINK SOL1.SWORLD
CONNECT TO TEST IDENTIFIED BY TEST USING SOL1;
LINK CREATED
ON SQL /> SELECT * FROM [email protected]
Message:
SQL COULD NOT RESOLVE THE SERVICE NAME
Then I dropped the database link and create a link from Oracle enterprise schema manager
I create a public link of fixed user. After login and password, I add the name in service tab as sol1
When I test the connection massage appears
Link is not active
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信这是您问题的根源:
这表明 SOL1 不在 tnsnames.ora 中,该条目无效或某些网络连接问题阻止 Oracle 将服务名称转换为地址。
I believe this is the source of your problem:
This indicates that SOL1 is not in tnsnames.ora, the entry is invalid or some network connectively issue is preventing Oracle from turning the service name into an address.
确保 tnsnames 文件中有这些条目。
您现在可以在任一方向创建链接。
您的链接也可以是私人的。
Make sure you have the entries in your tnsnames file.
You can now create your link in either direction.
Your link could be private also.