DB链接在DBaaS中不起作用,但在内部数据库中起作用 [英] DB link not working in DBaaS but working in On premise Database
问题描述
我正在使用以下命令创建DB link
I am using below command to create DB link
CREATE DATABASE LINK Dblink_test2
CONNECT TO apps IDENTIFIED BY xyzabc
USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=awss007.us.dell.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xxxmm122de)))';
数据库链接已成功创建,当我在内部数据库中创建数据库链接时,它正在返回数据.
The DB link got created successfully and it is returning data when I am creating it in on premise database.
但是当我在Dbaas
中执行相同的操作时,会创建DB link
,但是当我运行查询时,却遇到了以下错误.
But when I am doing same in my Dbaas
,DB link
is getting created but when I am running query I am getting below error.
select * from emp@Dblink_test2;
table
在那儿.在on premise database
中创建DB link
时,同样有效.
table
is there. Same is working when I am creating DB link
in on premise database
.
当本地环境为DBaas
而远程环境为On premise Database
时,问题就来了.
Issue is coming when local environment is DBaas
and Remote is On premise Database
.
您能帮我吗?
推荐答案
我将hostname
替换为IP address
,并且成功运行了.
I replaced hostname
by IP address
and it worked successfully.
CREATE DATABASE LINK Dblink_test2
CONNECT TO apps IDENTIFIED BY xyzabc
USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.32.33.22)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=oam122de)))';
上面的一个工作正常.
这篇关于DB链接在DBaaS中不起作用,但在内部数据库中起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!