Home » RDBMS Server » Networking and Gateways » ORA-12154: TNS:could not resolve service name
ORA-12154: TNS:could not resolve service name [message #66883] Thu, 27 February 2003 11:22 Go to next message
Bushan
Messages: 11
Registered: February 2003
Junior Member
Hi , I am trying to use dblink feature for the first time.I have 2 Solaris boxes with Oracle8 Enterprise Edition Release 8.0.4.0.0 on both.
This is what I did,
On machine1:
step 1: Added the following lines to tnsnames.ora file
hnpis88_tcp_wg8 =
(DESCRIPTION =
ADDRESS = (PROTOCOL= TCP)(Host= hnpis88)(Port= 1521))
CONNECT_DATA = (SID = WG8))
)
step 2: Ran this script to create a db link
create public database link dblink29
connect to user identified by password
using 'hnpis88_tcp_wg8';
I got 'Database link created'.
step 3: I did the following query to test the db link,
SQL> select count(*) from tablename@dblink29;
I am getting the following error:
ORA-12154: TNS:could not resolve service name

Machine2 : This is what I have in machine2's tnsnames.ora file
HNPIS88_TCP_WG8 =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = HNPIS88)(PORT =1521))
(CONNECT_DATA = (SID = WG8))
)

What am I doing wrong? Please help. Thanks.
Re: ORA-12154: TNS:could not resolve service name [message #66886 is a reply to message #66883] Thu, 27 February 2003 15:11 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
1. first make sure your tnsentries are correct.
- connect using sqlplus using the string HNPIS88_TCP_WG8
2. conventionally dblinks should be named same as connecStrings
3. else create it like this (if ur tnsentries are correct)

create database link dblink29
connect to user identified by password
using '< place here all ur tnsentries >';

pls Have look [url=http://www.orafaq.net/msgboard/plsql/messages/9630.htm] here <a>
check if GLOBAL_NAMES=true is so
look here
Re: ORA-12154: TNS:could not resolve service name [message #66888 is a reply to message #66883] Sun, 02 March 2003 14:56 Go to previous messageGo to next message
Bushan
Messages: 11
Registered: February 2003
Junior Member
Hi M.R, As you said,..

1. first make sure your tnsentries are correct.
- connect using sqlplus using the string HNPIS88_TCP_WG8

I couldn't connect to sqlplus using the string. What should I do next?
Re: ORA-12154: TNS:could not resolve service name [message #66893 is a reply to message #66888] Mon, 03 March 2003 06:14 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
you connectString is haveing problems..
change ur host with the value of the ip or comple machine name (machine.domainname) and try again.

hnpis88_tcp_wg8 =
(DESCRIPTION =
ADDRESS = (PROTOCOL= TCP)(Host= hnpis88)(Port= 1521))
CONNECT_DATA = (SID = WG8))
)

Re: ORA-12154: TNS:could not resolve service name [message #66912 is a reply to message #66888] Tue, 11 March 2003 11:36 Go to previous messageGo to next message
Bushan
Messages: 11
Registered: February 2003
Junior Member
Hi , I think I have a problem with my listener. I checked for the listener status using 'lsnrctl status' it says 'The listener supports no services'. I am pretty sure I have an Oracle instance running on this machine. How can I make the listener support my Oracle instance? Thanks for your help in advance.
Re: ORA-12154: TNS:could not resolve service name [message #66914 is a reply to message #66888] Wed, 12 March 2003 11:18 Go to previous message
Bushan
Messages: 11
Registered: February 2003
Junior Member
Hey, thanks man, I got it working. I have modified the listener.ora file , basically changed all TCP_LISTENER to LISTENER and it started working. Thanks for you help again.
Previous Topic: Net8 Assistant Personal Oracle 8i for Windows98
Next Topic: Listener problem
Goto Forum:
  


Current Time: Fri Apr 19 10:53:01 CDT 2024