问题
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.
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
is there. Same is working when I am creating DB link
in on premise database
.
Issue is coming when local environment is DBaas
and Remote is On premise Database
.
Could you please help me on the same?
回答1:
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)))';
The above one is working fine.
来源:https://stackoverflow.com/questions/60327074/db-link-not-working-in-dbaas-but-working-in-on-premise-database