| 订阅 | 在线投稿
分享
 
 
 

ORA-02019:未找到远程数据库的连接说明

来源:互联网  宽屏版  评论
2008-08-06 07:16:28

1. 建立 DATABASE LINK

CREATE PUBLIC DATABASE LINK ABC

CONNECT TO SA IDENTIFIED BY PASSWORD

USING '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = AAA)))';

2.测试

select * from test@ABC

3.请注意使用 DBLINK 时,INIT.ORA中 GLOBAL_NAME 的设置:

如果为 ture , 请使用DBLINK的全称,可在 all_db_links 中查到,如果为 FALSE, 不必使用全称,当出现

“ORA-02019:为找到远程数据库的连接说明”时,请使用全称,如:

select * from test@ABC.US.ORACLE.COM

4.SQL> select * from global_name;

GLOBAL_NAME

----------------------------------------------------------

LOCALSR

5. update global_name set GLOBAL_NAME = 'LOCALSR.US.ORACLE.COM' where GLOBAL_NAME = 'LOCALSR'

6.重启例程>>ok

SQL> desc global_name;

Name Type Nullable Default Comments

----------- -------------- -------- ------- ---------------

GLOBAL_NAME VARCHAR2(4000) Y global database name

1. 建立 DATABASE LINK CREATE PUBLIC DATABASE LINK ABC CONNECT TO SA IDENTIFIED BY PASSWORD USING '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = AAA)))'; 2.测试 select * from [url=mailto:test@ABC]test@ABC[/url] 3.请注意使用 DBLINK 时,INIT.ORA中 GLOBAL_NAME 的设置: 如果为 ture , 请使用DBLINK的全称,可在 all_db_links 中查到,如果为 FALSE, 不必使用全称,当出现 “ORA-02019:为找到远程数据库的连接说明”时,请使用全称,如: select * from [url=mailto:test@ABC.US.ORACLE.COM]test@ABC.US.ORACLE.COM[/url] 4.SQL> select * from global_name; GLOBAL_NAME ---------------------------------------------------------- LOCALSR 5. update global_name set GLOBAL_NAME = 'LOCALSR.US.ORACLE.COM' where GLOBAL_NAME = 'LOCALSR' 6.重启例程>>ok SQL> desc global_name; Name Type Nullable Default Comments ----------- -------------- -------- ------- --------------- GLOBAL_NAME VARCHAR2(4000) Y global database name
󰈣󰈤
 
 
 
>>返回首页<<
 
 热帖排行
 
 
王朝网络微信公众号
微信扫码关注本站公众号wangchaonetcn
 
 
静静地坐在废墟上,四周的荒凉一望无际,忽然觉得,凄凉也很美
©2005- 王朝网络 版权所有