Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Database Link::ORA-12154: TNS:could not resolve........

Re: Database Link::ORA-12154: TNS:could not resolve........

From: EscVector <Junk_at_webthere.com>
Date: 17 Nov 2006 07:21:20 -0800
Message-ID: <1163776880.325208.143750@h48g2000cwc.googlegroups.com>

sanjeev wrote:
> Hi Freinds,
>
> My platform is windows 2000 and oracle 9.2.0.....
>
> I have created link as below :
>
> create public database link A_LINK
> connect to SCOTT identified by tiger
> using 'AVAYA'
> --------------------------------
> In tnsnames.ora file
>
> AVAYA =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = ADB)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = AVAYA.ADB)
> )
> )
> -------------------------------
> select *
> from BOSSDEPARTMENT_at_A_LINK;
>
> After firing the above query i got the error
>
> ERROR at line 2:
> ORA-12154: TNS:could not resolve service name
>
>
> could any one help me
>
> Thnking in advance
>
> Sanjeev N.A.

For debugging, always try bypassing the TNS file and hardcode the connection in the link.

First glance I would also make sure you can ping, and tnsping the host before creating a link that directs to the tnsfile.

create database link
connect to scott identified by tiger
using
'(DESCRIPTION=(ADDRESS=(HOST=ADB)(PROTOCOL=TCP)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=AVAYA.ADB)))'; Received on Fri Nov 17 2006 - 09:21:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US