Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Query on database link
--0-1927150952-971097292=:59999
Content-Type: text/plain; charset=us-ascii
You must have global_names turned on. That requires the db link name to match the database name that you're connecting to. Either turn off global_names, or modify the link name and global name of the remote database to be the same. magesh <magesh_at_garoo.ne.jp> wrote:
Dear All
I created a database link between 2 database . When i am try to access the table "emp" of scott scheme from the second database , getting an error like this ...
sql> select * from emp_at_orcl.kaiji1;
Error at line 1:
ora-02085 :database links orcl.kaiji1 connects to orcl.world.
Why itz trying to connect to "orcl.world" instead of "orcl.kaiji1", How to resolve this problem ?
Details of 2 databases :-
first database(Source) ------------------------------------Second database(destination) db_name : ora8------------------------------------------------orcl global_name:true----------------------------------------------true db_domain:none-----------------------------------------------kaiji1
Listener.ora of ORCL
(GLOBAL_DBNAME= ORCL.kaiji1) (ORACLE_HOME= /u01/app/oracle/product/8.0.5) (SID_NAME = ORCL)
tnsnames.ora of ORCL
tnsnames.ora of ora8
where 210.227.71.51 is Kaiji1 database
svrmgrl >connect system/manager (connected to source database (ORA8) )
sql > create public database link orcl.kaiji1 connect to scott identified by tiger using 'kaiji1';
Itz created with out any error ....
Please ..any one suggest me ..what was the error ??
Thanx In Advance
Bye
Magesh
<P> <BR>You must have global_names turned on. That requires the db link name to match the database name that you're connecting to. Either turn off global_names, or modify the link name and global name of the remote database to be the same. <P> <B><I>magesh <magesh_at_garoo.ne.jp></I></B> wrote: <BR> <BLOCKQUOTE style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><BR> <META content="MSHTML 5.00.2919.6307" name=GENERATOR><BR> <STYLE></STYLE> <BR><BR> <DIV><FONT face=Arial size=2>Dear All</FONT></DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2> I created a database link between 2 database . When i am try to access the table "emp" of scott scheme from the second database , getting</FONT></DIV><BR> <DIV><FONT face=Arial size=2>an error like this ...</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>sql> select * from <A href="mailto:emp_at_orcl.kaiji1">emp_at_orcl.kaiji1</A>;</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Error at line 1:</FONT></DIV><BR> <DIV><FONT face=Arial size=2> ora-02085 :database links orcl.kaiji1 connects to orcl.world.</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Why itz trying to connect to "orcl.world" instead of "orcl.kaiji1", How to resolve this problem ?</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Details of 2 databases :-</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>first database(Source) ------------------------------------Second database(destination)</FONT></DIV><BR> <DIV><FONT face=Arial size=2>db_name : ora8------------------------------------------------orcl</FONT></DIV><BR> <DIV><FONT face=Arial size=2>global_name:true----------------------------------------------true</FONT></DIV><BR> <DIV><FONT face=Arial size=2>db_domain:none-----------------------------------------------kaiji1</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Listener.ora of ORCL</FONT></DIV><BR> <DIV><FONT face=Arial size=2>------------------------------</FONT></DIV><BR> <DIV><FONT face=Arial size=2>SID_LIST_LISTENER =<BR> (SID_LIST =<BR> (SID_DESC =<BR> (GLOBAL_DBNAME= ORCL.kaiji1)<BR> (ORACLE_HOME= /u01/app/oracle/product/8.0.5)<BR> (SID_NAME = ORCL)<BR> ) </FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>tnsnames.ora of ORCL</FONT></DIV><BR> <DIV><FONT face=Arial size=2>------------------------------------</FONT></DIV><BR> <DIV><FONT face=Arial size=2>ORCL.kaiji1 =<BR> (DESCRIPTION =<BR> (ADDRESS = (PROTOCOL= TCP)(Host= kaiji1)(Port= 1521))<BR> (CONNECT_DATA = (SID = ORCL))<BR> ) </FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>tnsnames.ora of ora8 </FONT></DIV><BR> <DIV><FONT face=Arial size=2>-----------------------------------</FONT></DIV><BR> <DIV><FONT face=Arial size=2>kaiji1=<BR> (DESCRIPTION =<BR> (ADDRESS = (PROTOCOL= TCP)(Host= 210.227.71.51)(Port= 1521))<BR> (CONNECT_DATA = (SID = ORCL))<BR> ) </FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>where 210.227.71.51 is Kaiji1 database</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>svrmgrl >connect system/manager (connected to source database (ORA8) )</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>sql > create public database link orcl.kaiji1 connect to scott identified by tiger using 'kaiji1';</FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Itz created with out any error ....</FONT></DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Please ..any one suggest me ..what was the error ??</FONT></DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Thanx In Advance </FONT></DIV><BR> <DIV> </DIV><BR> <DIV><FONT face=Arial size=2>Bye</FONT></DIV><BR> <DIV><FONT face=Arial size=2>Magesh</FONT></DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV> </DIV><BR> <DIV> </DIV></BLOCKQUOTE><p><br><hr size=1><b>Do You Yahoo!?</b><br>Received on Mon Oct 09 2000 - 08:14:52 CDT
![]() |
![]() |