DB link not working in DBaaS but working in On premise Database

百般思念 提交于 2020-03-04 19:34:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!