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

This is a discussion on Database Link::ORA-12154: TNS:could not resolve........ within the Oracle Server forums in Oracle Database category; 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....

Go Back   Database Forum > Oracle Database > Oracle Server

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-17-2006, 03:36 AM
Default Database Link::ORA-12154: TNS:could not resolve........

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.

Reply With Quote
  #2  
Old 11-17-2006, 07:20 AM
Default Re: Database Link::ORA-12154: TNS:could not resolve........


sanjeev schreef:

> 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


Is the a default domain in sqlnet.ora? If so - use that in the Database link
definition.
Is this the tnsnames from the server?

Also: is global_names true? If so, you will get another error if avaya
point
to a sid orcl (or anything different than avaya - however, not the
error
you are facing)

Reply With Quote
  #3  
Old 11-17-2006, 07:20 AM
Default Re: Database Link::ORA-12154: TNS:could not resolve........


sanjeev schreef:

> 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


Is the a default domain in sqlnet.ora? If so - use that in the Database link
definition.
Is this the tnsnames from the server?

Also: is global_names true? If so, you will get another error if avaya
point
to a sid orcl (or anything different than avaya - however, not the
error
you are facing)

Reply With Quote
  #4  
Old 11-17-2006, 11:21 AM
Default Re: Database Link::ORA-12154: TNS:could not resolve........


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)(PO RT=1521))(CONNECT_DATA=(SERVICE_NAME=AVAYA.ADB)))' ;

Reply With Quote
  #5  
Old 11-17-2006, 11:21 AM
Default Re: Database Link::ORA-12154: TNS:could not resolve........


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)(PO RT=1521))(CONNECT_DATA=(SERVICE_NAME=AVAYA.ADB)))' ;

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 11:19 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.