Home » Infrastructure » Windows » ORA-12154: TNS could not resolve service name. Please help! (Oracle 9i, Windows XP Professional)
ORA-12154: TNS could not resolve service name. Please help! [message #325667] Sat, 07 June 2008 07:31 Go to next message
hermiod
Messages: 7
Registered: September 2007
Location: UK
Junior Member
Hello all

Firstly, my apologies for bringing up a topic that has probably been done so many times in the past, but I have scoured the internet and tried out every solution to this problem but with absolutely no luck.
I'm new to Oracle so it is obviously something I'm doing wrong but I just can't figure out what it is.

A couple of weeks ago I re-installed Oracle after Windows went tits up, and after much wrangling managed to get everything working. I turn off the machine and come back to it the next day and suddenly it no longer works, and I get the above mentioned error message.

Here are all the details of my setup:

**EDIT**
I have started the listener manually via lsnrctl and it returns the following output:

Alias: Live
Version: TNSLSNR for 32-bit Windows: Version 9.0.1.1.1 - Production
Start Date: 07-JUN-2008 13:36:30
Uptime: 0 days 0 hr. 0 min. 2 sec
Trace Level: off
Security: OFF
SNMP: OFF
Listener Parameter File: C:\oracle\ora90\network\admin\listener.ora
Listener Log File: C:\oracle\ora90\network\log\live.log
Listening Endpoints Summary...
<DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=taonas)(PORT=1521)))
Services Summary...
Services "qlslive" has 1 instance(s).
Instance "qlslive", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

But when I type in status it provides the same as above except the services summary which is different:
Services Summary...
Service "MODOSE" has 1 instance(s)
Instance "qlslive", status READY, has 1 handler(s) for this service...
Instance "qlslive", status UNKNOWN, has 1 handler(s) for this service...
Instance "qlslive", status READY, has 3 handler(s) for this service...

I don't know if this difference is significant as I have no idea where the "MODOSE" comes from...

**End EDIT**

My database name is qlslive, host is Taonas.
Oracle home directory is C:\oracle\ora90
All files posted below reside in C:\oracle\ora90\network\admin

Listener.ora file
# LISTENER.ORA Network Configuration File: C:\oracle\ora90\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LIVE =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = qlslive)
(ORACLE_HOME = c:\oracle\ora90)
(SID_NAME = qlslive)
)
)

LIVE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = taonas)(PORT = 1521))
)

Names.ora
# NAMES.ORA Network Configuration File: C:\oracle\ora92\NETWORK\ADMIN\names.ora
# Generated by Oracle configuration tools.

NAMES.PASSWORD = E83BB2EAC7F7B02E

NAMES.SERVER_NAME = qlslive

NAMES.ADDRESSES =
(ADDRESS = (PROTOCOL = TCP)(HOST = taonas)(PORT = 1521))


sqlnet.ora
# SQLNET.ORA Network Configuration File: C:\oracle\ora90\NETWORK\ADMIN\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
# SQLNET.AUTHENTICATION_SERVICES = (NONE)


tnsnames.ora
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora90\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

QLSLIVE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = taonas)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = qlslive)
)
)

PC specs:
Windows XP Professional Service Pack 2
AMD Athlon 4 processor 1.10Ghz
640mb RAM

I know the above system is pretty weak ram-wise, but I have had Oracle working with no problems on this PC in the past and the spec hasn't changed. It is only a personal development server so is only taking two or three connections max at any one time, rarely more than 1.

I am able to login to Enterprise Manager and can see that the database is 'open'. But whenever I try to access the database via SQL+ or any other method, I get the 12154 error.

Any assistance that you guys can offer would be gratefully received, as I need to get this developer server online asap.

Thankyou in advance for your help.

Alan

[Updated on: Sat, 07 June 2008 07:46]

Report message to a moderator

Re: ORA-12154: TNS could not resolve service name. Please help! [message #325675 is a reply to message #325667] Sat, 07 June 2008 09:12 Go to previous message
BlackSwan
Messages: 21938
Registered: January 2009
Senior Member
[oracle@amo1test ~]$ oerr ora 12154
12154, 00000, "TNS:could not resolve the connect identifier specified"
// *Cause:  A connection to a database or other service was requested using
// a connect identifier, and the connect identifier specified could not
// be resolved into a connect descriptor using one of the naming methods
// configured. For example, if the type of connect identifier used was a
// net service name then the net service name could not be found in a 
// naming method repository, or the repository could not be
// located or reached.
// *Action:
//   - If you are using local naming (TNSNAMES.ORA file):
//      - Make sure that "TNSNAMES" is listed as one of the values of the
//        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
//        (SQLNET.ORA)
//      - Verify that a TNSNAMES.ORA file exists and is in the proper
//        directory and is accessible.
//      - Check that the net service name used as the connect identifier
//        exists in the TNSNAMES.ORA file.
//      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
//        file.  Look for unmatched parentheses or stray characters. Errors
//        in a TNSNAMES.ORA file may make it unusable.
//   - If you are using directory naming:
//      - Verify that "LDAP" is listed as one of the values of the
//        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
//        (SQLNET.ORA).
//      - Verify that the LDAP directory server is up and that it is
//        accessible.
//      - Verify that the net service name or database name used as the
//        connect identifier is configured in the directory.
//      - Verify that the default context being used is correct by
//        specifying a fully qualified net service name or a full LDAP DN
//        as the connect identifier
//   - If you are using easy connect naming:
//      - Verify that "EZCONNECT" is listed as one of the values of the
//        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
//        (SQLNET.ORA).
//      - Make sure the host, port and service name specified
//        are correct.
//      - Try enclosing the connect identifier in quote marks.
// 
//   See the Oracle Net Services Administrators Guide or the Oracle
//   operating system specific guide for more information on naming.

For the most part, your post & conclusion are decent.
However you do not show us EXACTLY how you are invoking sqlplus.

Most important is that SQL*Net is NOT required to access the database assuming a couple of details are met.
1) You are logged directly onto the system where RDBMS runs
2) You are logged onto the system as the same owner as Oracle software
3)The environment is correct to allow OS authentification

Good Luck!
Previous Topic: How to set PHP?
Next Topic: installing developer 10g on windows vista
Goto Forum:
  


Current Time: Wed Apr 16 15:04:10 CDT 2014

Total time taken to generate the page: 0.16097 seconds