Home » RDBMS Server » Networking and Gateways » ORA-12154: TNS:could not resolve service name
ORA-12154: TNS:could not resolve service name [message #67152] Thu, 18 December 2003 05:25 Go to next message
mouar
Messages: 1
Registered: December 2003
Junior Member
hi,
I installed Oracle 9i under W2K with preconfigured DB (SID=ORCL), after that I intalled Oracle developer suite and everything is OK but, When I created second DB (SID=SUMM), I get "ORA-12154: TNS:could not resolve service name" when I tried to connect with :
SQL> connect sys/oracle@summ as sysdba

NB: I have no problem when I use
SQL> connect sys/oracle@orcl as sysdba

any help is welcome

Below, are my SQLNET.ORA, TNSNAMES.ORA, LISTENER.ORA files
-------------------------------------------------
# SQLNET.ORA Network Configuration File: C:oracleora90networkadminsqlnet.ora
# Generated by Oracle configuration tools.

SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
-------------------------------------------------
# TNSNAMES.ORA Network Configuration File: C:oracleora90NETWORKADMINtnsnames.ora
# Generated by Oracle configuration tools.

ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = pieix)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = pieix)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

SUMM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = pieix)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SUMM)
)
)

----------------------------------------------------
# LISTENER.ORA Network Configuration File: C:oracleora90NETWORKADMINlistener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = pieix)(PORT = 1521))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:oracleora90)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = C:oracleora90)
(SID_NAME = ORCL)
)
(SID_DESC =
(GLOBAL_DBNAME = SUMM)
(ORACLE_HOME = C:oracleora90)
(SID_NAME = SUMM)
)
)
--------------------------------------------------
Re: ORA-12154: TNS:could not resolve service name [message #67153 is a reply to message #67152] Fri, 19 December 2003 02:15 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
comment all the entries in sqlnet.ora and try again.
Re: ORA-12154: TNS:could not resolve service name [message #67165 is a reply to message #67152] Wed, 07 January 2004 23:12 Go to previous messageGo to next message
dinesh pandian
Messages: 1
Registered: January 2004
Junior Member
Try this

# TNSNAMES.ORA Network Configuration File: D:oracleora81networkadmintnsnames.ora
# Generated by Oracle configuration tools.

TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ctp-vi0241)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ctp-vi0241)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = test)
(PRESENTATION = http://admin)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

dusty =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ctp-vi0241)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dusty)
)
)

INST2_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ctp-vi0241)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = dusty)
(PRESENTATION = http://admin)
)
)
Re: ORA-12154: TNS:could not resolve service name [message #67166 is a reply to message #67152] Fri, 09 January 2004 11:41 Go to previous messageGo to next message
Ken Montagna
Messages: 2
Registered: January 2004
Junior Member
I had the same problem, I just removed the DEFAULT DOMAIN parameter and NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

and only left SQLNET.AUTHENTICATION_SERVICES= (NTS)

in my sqlnet.ora file
Re: ORA-12154: TNS:could not resolve service name [message #67183 is a reply to message #67166] Wed, 21 January 2004 07:27 Go to previous messageGo to next message
D_Hernandez
Messages: 1
Registered: January 2004
Junior Member
Your solution worked for me as well.

Why does this happen?

--Dave.
Re: ORA-12154: TNS:could not resolve service name [message #67189 is a reply to message #67166] Sat, 24 January 2004 01:27 Go to previous messageGo to next message
Mridul
Messages: 1
Registered: January 2004
Junior Member
Hi "Ken Montagna (207.93.240.2)" ..

Ur trick worked for me as well, if U cud just let me know or explain how did this work ?

I had installed Oracle 8i Personal Edition on Win2K and then D2K, I cud connect easily thru Oracle's SQL Plus, but when I created some service names in the tnsnames.ora file under the directory where D2K was installed, There was no way I cud connect to the Oracle database thru my D2K's SQL Plus ... I just have no idea how !!!

I really request u to tell me how did this stuff work !!!

Mridul
Re: ORA-12154: TNS:could not resolve service name [message #67244 is a reply to message #67153] Fri, 05 March 2004 08:48 Go to previous messageGo to next message
Alberto Granja
Messages: 1
Registered: March 2004
Junior Member
Yes !! Thanks Mahesh !!
Re: ORA-12154: TNS:could not resolve service name [message #67268 is a reply to message #67166] Sun, 21 March 2004 14:27 Go to previous messageGo to next message
pbible
Messages: 1
Registered: March 2004
Junior Member
This saved me a ton of time. Thanks very much!!!
Re: ORA-12154: TNS:could not resolve service name [message #67286 is a reply to message #67183] Fri, 02 April 2004 01:15 Go to previous messageGo to next message
Mariola
Messages: 2
Registered: March 2004
Junior Member
Hi,

We obtain the same message when we execute "sqlplus" comand, and we cann't connect to our Oracle DB Server (on Soaris 8 platform)with our Oracle client (on Soaris 8 platform to).
We have next configurtion files:
bash-2.03$ more sqlnet.ora
# SQLNET.ORA Network Configuration File: /export/home/oracle/OraHome1/network/admin/sqlnet.ora

# Generated by Oracle configuration tools.

#NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
NAMES.DIRECTORY_PATH= (TNSNAMES)
bash-2.03$ more tnsname.ora
# TSNAMES.ORA Network Configuration File: /var/opt/oracle/OraHome1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.



MONITOR =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 172.22.190.123)(PORT = 1531))

)

(CONNECT_DATA =

(SID = MONITOR)

)

)

I try all you say, but unsuccessfully.

Can anybody help me?, please.
Thanks.
Best regardards:

Mariola
Re: ORA-12154: TNS:could not resolve service name [message #67287 is a reply to message #67189] Sun, 04 April 2004 01:41 Go to previous messageGo to next message
Chris
Messages: 128
Registered: November 1998
Senior Member
Hi everyone *__8

I've installed Oracle 9i Standard Web Development
server application on my pc,using Win XP.

When i start SQL Plus it required user name and password...when i enter the user name and password keep on getting this error!!

I will appreciate all kind of help!

cheers
Re: ORA-12154: TNS:could not resolve service name [message #67297 is a reply to message #67166] Tue, 06 April 2004 21:48 Go to previous messageGo to next message
huanglibo
Messages: 3
Registered: April 2004
Junior Member
my client is 9i under linux,sever is 8i under windows2k .i config my sql.net as yours .but i doesn't work. can higher version client connect to lower version sever?
Re: ORA-12154: TNS:could not resolve service name [message #67298 is a reply to message #67297] Wed, 07 April 2004 08:19 Go to previous messageGo to next message
Ken Montagna
Messages: 2
Registered: January 2004
Junior Member
The 9i client can access the 8i server. This is not an issue. Is your sql.net the same on client and server? Also, ensure you can ping the server that is specified in your TNSnames.ora file.
Re: ORA-12154: TNS:could not resolve service name [message #67321 is a reply to message #67166] Wed, 28 April 2004 13:03 Go to previous messageGo to next message
AKillingham
Messages: 1
Registered: April 2004
Junior Member
Thanks Ken! Your solution helped me too!
Re: ORA-12154: TNS:could not resolve service name [message #67325 is a reply to message #67166] Mon, 03 May 2004 20:27 Go to previous messageGo to next message
Alice
Messages: 2
Registered: March 2002
Junior Member
Thanks heaps!!
Re: ORA-12154: TNS:could not resolve service name [message #67333 is a reply to message #67166] Sat, 08 May 2004 06:54 Go to previous messageGo to next message
Dimitar Hristov
Messages: 1
Registered: May 2004
Junior Member
Thanks!!! It works perfekt!!
Re: ORA-12154: TNS:could not resolve service name [message #67335 is a reply to message #67166] Fri, 14 May 2004 13:53 Go to previous messageGo to next message
happy oracle user
Messages: 1
Registered: May 2004
Junior Member
Ken, you rock! It makes no sense to me, but it works.
Re: ORA-12154: TNS:could not resolve service name [message #67346 is a reply to message #67152] Wed, 26 May 2004 08:43 Go to previous messageGo to next message
Marielchr
Messages: 1
Registered: May 2004
Junior Member
hi,
I'm connecting to oracle through jsp pages!!
and displayed the following error:

Error: Io exception: The Network Adapter could not establish the connection
and
"ORA-12154: TNS:could not resolve service name"

Please!! any help is welcome
Re: ORA-12154: TNS:could not resolve service name [message #67366 is a reply to message #67166] Fri, 04 June 2004 00:43 Go to previous messageGo to next message
AL
Messages: 24
Registered: October 2000
Junior Member
Thanks Ken, worked for me too! But why?
Re: ORA-12154: TNS:could not resolve service name [message #67367 is a reply to message #67366] Fri, 04 June 2004 20:19 Go to previous messageGo to next message
Kiranmoy
Messages: 1
Registered: June 2004
Junior Member
This doesnt work for me. I keep getting the same error when I try to connect to Oracle 9i with VB.net.
Please help!!
Re: ORA-12154: TNS:could not resolve service name [message #67372 is a reply to message #67166] Tue, 08 June 2004 04:31 Go to previous messageGo to next message
killapp
Messages: 1
Registered: June 2004
Junior Member
It worked for me too....
Thanks, Ken. But I would like to know what difference does it make internally to remove these 2 lines in sqlnet.ora?
Re: ORA-12154: TNS:could not resolve service name [message #67373 is a reply to message #67166] Tue, 08 June 2004 23:59 Go to previous messageGo to next message
SesiL
Messages: 1
Registered: June 2004
Junior Member
Yeah .. !! it work for me ,too.
Re: ORA-12154: TNS:could not resolve service name [message #67401 is a reply to message #67166] Wed, 23 June 2004 23:12 Go to previous messageGo to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
Ken..thanks a lottttt....it worked !!!
Re: ORA-12154: TNS:could not resolve service name [message #67441 is a reply to message #67166] Tue, 27 July 2004 09:03 Go to previous messageGo to next message
Qi
Messages: 3
Registered: July 2004
Junior Member
I got ORA-12154:TNS:could not resolve service name when I try to make a connection from asp.net application ( web server runs on my 2k pc). I used the same connection string I used in window application (in .net).

I tried to add <identity impersonate="true"/> in the web.config file for the application. But it is still not working.

Can anyone help?

Thanks.
Re: ORA-12154: TNS:could not resolve service name [message #67452 is a reply to message #67152] Sun, 01 August 2004 12:41 Go to previous messageGo to next message
Venkat
Messages: 110
Registered: February 2001
Senior Member
Hi I am getting the same error. I am using oracle 8i on windows xp professional. I tried everything changing in the D:OraHome1networkADMINtnsnames file. checked everything, tested the database connection in net8 but i cannot connect to the database in forms. Also, Created different homes for oracle and developer still doest work. The same error
ORA-12154: TNS:could not resolve service name
comes up. Please help.
thanks,
Venkat.
Re: ORA-12154: TNS:could not resolve service name [message #67463 is a reply to message #67452] Sun, 08 August 2004 09:17 Go to previous messageGo to next message
Suresh
Messages: 189
Registered: December 1998
Senior Member
Hi,
There are many reasons for that error.
Here is a usefull link.

http://www.easywebtech.com/oracle/con_err.html

Thanks,
Suresh
Re: ORA-12154: TNS:could not resolve service name [message #67464 is a reply to message #67166] Sun, 08 August 2004 09:21 Go to previous messageGo to next message
Suresh
Messages: 189
Registered: December 1998
Senior Member
Hi,
sqlnet.ora is not the only reason to this error.
Here is a useful link.
http://www.easywebtech.com/oracle/con_err.html
Re: ORA-12154: TNS:could not resolve service name [message #67471 is a reply to message #67452] Fri, 13 August 2004 00:11 Go to previous messageGo to next message
Naveen
Messages: 75
Registered: June 2001
Member
hi,
i have got problem with ora-12541 TNS no listener in my oracle 8i.I created a database and i changed my pc network name.after changing the name my database is not working.I tried to start lnsrctl through command window but it gives me error like no 125600 TNS PROTOCOL ADAPTER ERROR.
HELP ME
Re: ORA-12154: TNS:could not resolve service name [message #67490 is a reply to message #67452] Mon, 23 August 2004 05:49 Go to previous messageGo to next message
Aseem Sharma
Messages: 1
Registered: August 2004
Junior Member
i ma facing the problem regarding to connect the oracle
i am giving 'User name' , 'Password' and 'Host String' but still getting the error ORA-12154.
Could u relpy me soon , that what's the problem.
Thanks
Regards
Aseem Sharma
Re: ORA-12154: TNS:could not resolve service name [message #67494 is a reply to message #67452] Thu, 26 August 2004 05:46 Go to previous messageGo to next message
Jayaram Jitmal
Messages: 1
Registered: August 2004
Junior Member
My problem was resolved by inserting the IP address of the Oracle box in my host file. Our DNS server di dnot have the Oracle box as a host.
Re: ORA-12154: TNS:could not resolve service name [message #67496 is a reply to message #67463] Fri, 27 August 2004 07:45 Go to previous messageGo to next message
mikey
Messages: 4
Registered: March 2001
Junior Member
Hi There,

I am having similar problem "...TNS:could not resolve service name", except that this problem only occures when I am trying to connect to Oracle using DBArtisan (v7). Otherwize I can connect using sqlPlus with no problem.

Any help appreciated.

Mike
Re: ORA-12154: TNS:could not resolve service name [message #67499 is a reply to message #67494] Sun, 29 August 2004 08:37 Go to previous messageGo to next message
Kelvin
Messages: 6
Registered: January 2002
Junior Member
i have the same problem. but where is Oracle box?
Re: ORA-12154: TNS:could not resolve service name [message #67512 is a reply to message #67464] Mon, 06 September 2004 01:23 Go to previous messageGo to next message
sri
Messages: 154
Registered: February 2000
Senior Member
Unable to establish a connection
Please ensure that the connection properties are correct and the source is available.

ADO Error Microsoft ODBS DRIVER FOR ORACLE [[ORCLE]] ORA 12154 : TNS COULD NOT RESOLVE SERVICE NAME.

[[MICROSOFT]] [[ODBC DRIVER MANAGER]] DRIVER SQLSET CONNECT ATTR FAILED
Re: ORA-12154: TNS:could not resolve service name [message #67521 is a reply to message #67152] Tue, 14 September 2004 01:56 Go to previous messageGo to next message
AlbertoHB
Messages: 1
Registered: September 2004
Junior Member
I have de same error
With oracle8i an developer 6i. i had proved all and it doesn't work...

help please..
Re: ORA-12154: TNS:could not resolve service name [message #67522 is a reply to message #67166] Tue, 14 September 2004 10:54 Go to previous messageGo to next message
dhanasekar
Messages: 1
Registered: September 2004
Junior Member
I should also pat Ken for the suggestion. This is in a Linux box and I simply renamed the file. It worked!
Re: ORA-12154: TNS:could not resolve service name [message #67525 is a reply to message #67166] Wed, 15 September 2004 08:21 Go to previous messageGo to next message
Nikos
Messages: 1
Registered: September 2004
Junior Member
Yupp, it worked for me too! Thx man!
Re: ORA-12154: TNS:could not resolve service name [message #67534 is a reply to message #67166] Mon, 20 September 2004 06:38 Go to previous messageGo to next message
Indy
Messages: 1
Registered: September 2004
Junior Member
This was very helpful! Thanks!!
Re: ORA-12154: TNS:could not resolve service name [message #67537 is a reply to message #67496] Tue, 21 September 2004 16:20 Go to previous messageGo to next message
sbullik
Messages: 1
Registered: September 2004
Junior Member
I am having the same problem too..I am able to connect to Oracle using sqlplus but not when using DBArtisan. It gives me the error:
xxxx -- ORA-12154: TNS:could not resolve service name

Does anyone have the solution for this?
Re: ORA-12154: TNS:could not resolve service name [message #67544 is a reply to message #67152] Tue, 28 September 2004 13:37 Go to previous messageGo to next message
Solved with TNS_ADMIN env
Messages: 1
Registered: September 2004
Junior Member
I followed the link suggested by Suresh:
http://www.easywebtech.com/oracle/con_err.html

Created TNS_ADMIN environment variable and solved my problem.

Thanks,
Khang Nguyen
Re: ORA-12154: TNS:could not resolve service name [message #67548 is a reply to message #67165] Wed, 29 September 2004 19:46 Go to previous messageGo to next message
easypeasy
Messages: 1
Registered: September 2004
Junior Member
I found that somehow the environment variable
ORACLE_HOME was set to another drive, this seemed to really mess things up.
Re: ORA-12154: TNS:could not resolve service name [message #67550 is a reply to message #67152] Fri, 01 October 2004 23:46 Go to previous messageGo to previous message
Akinnurun Adedoyin
Messages: 1
Registered: October 2004
Junior Member
Before using this approach make sure that you tnsnames.ora files are well set.

i had a similar problem too..especially when you have 2 oracle homes.

i set the TNS_ADMIN in the registry to point to the oracle home where the database resides.

i was able to C:tnsping <database>
but applications from my oracle suite 10g was still not connecting to database.

so i right clicked on each program and clicked on properties .. the start in text box..
i made it point to the oracle home which had the database..that solved the problem for all the applications in the suite.

And surprisingly that solved the puzzle
Previous Topic: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Next Topic: Ora-12546 Tns Permission Failed
Goto Forum:
  


Current Time: Fri Mar 29 02:12:47 CDT 2024