Home » RDBMS Server » Networking and Gateways » ORA-12154 TNS: could not resolve service name (Oracle 9i)
ORA-12154 TNS: could not resolve service name [message #487231] Fri, 24 December 2010 02:15 Go to next message
m_khaleeq2006
Messages: 24
Registered: February 2010
Location: Pakistan
Junior Member
Dear Sir(s)

My server database is not connected today whenever I try to connect it. It was working properly till yesterday but today morning when I came to office and want to connect with server then my database server show the message "ORA-12154 TNS: could not resolve the service name" and not connected. Please help.

Thanks
Re: ORA-12154 TNS: could not resolve service name [message #487232 is a reply to message #487231] Fri, 24 December 2010 02:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-12154: 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.

Regards
Michel
Re: ORA-12154 TNS: could not resolve service name [message #487268 is a reply to message #487232] Fri, 24 December 2010 08:37 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
ORA-12154 means one thing only & that is the TNS_ALIAS used in the connection string
could NOT be found in the tnsnames.ora file that was used to resolve this alias.
So either the alias is wrong/missing or using incorrect tnsnames.ora file. PERIOD
Re: ORA-12154 TNS: could not resolve service name [message #487410 is a reply to message #487268] Sun, 26 December 2010 22:09 Go to previous messageGo to next message
m_khaleeq2006
Messages: 24
Registered: February 2010
Location: Pakistan
Junior Member
Please tell me the solution step by step.
Re: ORA-12154 TNS: could not resolve service name [message #487423 is a reply to message #487410] Mon, 27 December 2010 00:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The ACTIO part of my message is a step by step, what do you want more?

Regards
Michel
Re: ORA-12154 TNS: could not resolve service name [message #487425 is a reply to message #487423] Mon, 27 December 2010 00:57 Go to previous messageGo to next message
m_khaleeq2006
Messages: 24
Registered: February 2010
Location: Pakistan
Junior Member
Sir I am sending my server's Listner.Ora, TNSNAMES.ora and SQLNET.ora. Please check them and give me some suggestions.

=========HERE IS LISTNER.ORA===========
# LISTENER.ORA Network Configuration File: F:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.

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

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = F:\oracle\ora92)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = prodhcl)
(ORACLE_HOME = F:\oracle\ora92)
(SID_NAME = prodhcl)
)
)
=========HERE IS SQLNET.ORA=================
# SQLNET.ORA Network Configuration File: F:\oracle\ora92\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DEFAULT_DOMAIN = dewangroup.com.pk

# SQLNET.AUTHENTICATION_SERVICES= (NTS)
SQLNET.AUTHENTICATION_SERVICES= (NONE)

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
========HERE IS TNSNAMES.ORA===============
# TNSNAMES.ORA Network Configuration File: F:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

INST1_HTTP.DEWANGROUP.COM.PK =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dtsml_db)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)

PRODHCL.DEWANGROUP.COM.PK =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dhcl_db)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = prodhcl)
)
)

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


ORCL.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = scl)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
)

====================================
Please check these files and then tell me whats wrong with these files and how I can overcome?
Thanks
Re: ORA-12154 TNS: could not resolve service name [message #487426 is a reply to message #487425] Mon, 27 December 2010 00:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As we have not the connection string you used we cannot give any help.

Regards
Michel
Re: ORA-12154 TNS: could not resolve service name [message #487463 is a reply to message #487426] Mon, 27 December 2010 08:29 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>(HOST = dhcl_db)
>(HOST = scl)

How many different DB Servers & how many different Oracle instances involved?
Is Oracle client system different from DB Server system?
Re: ORA-12154 TNS: could not resolve service name [message #487471 is a reply to message #487463] Mon, 27 December 2010 22:04 Go to previous messageGo to next message
m_khaleeq2006
Messages: 24
Registered: February 2010
Location: Pakistan
Junior Member
There are two different servers.
dhcl_db => Database Server in which the database has installed.
scl => is the server from which the software is running/ our software is copied on this server and running from this source.
Re: ORA-12154 TNS: could not resolve service name [message #487477 is a reply to message #487471] Tue, 28 December 2010 01:21 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Mon, 27 December 2010 07:59
As we have not the connection string you used we cannot give any help.

Regards
Michel

Previous Topic: resetting password for Listener -inherit
Next Topic: Comparing Gateways
Goto Forum:
  


Current Time: Fri Mar 29 06:38:18 CDT 2024