Home » Developer & Programmer » Forms » ORA-12154 : TNS: Could Not Resolve Service Names
ORA-12154 : TNS: Could Not Resolve Service Names [message #81044] Mon, 30 December 2002 22:09 Go to next message
Ravi
Messages: 251
Registered: June 1998
Senior Member
Hello

I am trying to connect to NEEDB from ORACLE FORMS and got "ORA-12154 : TNS: Could Not Resolve Service Names" error. I Installed both Oracle Developer 2000 and Personnel Oracle 8.1.7 in one WINDOWS 98 SE machine. The Oracle Developer 2000 installed in C:ORAWIN95 and Personnel Oracle 8.1.7 installed in C:OracleOra81.
I started LISTENER and DATABASE. Any help for this problem will be appreciated.

+++++++ TNSNAMES.ORA+++++++++
# TNSNAMES.ORA Network Configuration File: C:OracleOra81NETWORKADMINtnsnames.ora
# Generated by Oracle configuration tools.

NEEDB.ANDRSN01.TN.COMCAST.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oemcomputer)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = NEEDB)
)
)

EXTPROC_CONNECTION_DATA.ANDRSN01.TN.COMCAST.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

TEST.ANDRSN01.TN.COMCAST.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oemcomputer)(PORT = 1521))
)
(CONNECT_DATA =
(SID = NEEDB)
)
)

+++++++++++++++

++++LISTENER.ORA++++++++=
# LISTENER.ORA Network Configuration File: C:OracleOra81networkadminlistener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oemcomputer)(PORT = 1521))
)
)
(DESCRIPTION =
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
)
(ADDRESS = (PROTOCOL = TCP)(HOST = oemcomputer)(PORT = 2481))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:OracleOra81)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = NEEDB)
(ORACLE_HOME = C:OracleOra81)
(SID_NAME = NEEDB)
)
)

+++++++++++++++++++

Thanks,
Ravi.
Re: ORA-12154 : TNS: Could Not Resolve Service Names [message #81070 is a reply to message #81044] Thu, 02 January 2003 11:20 Go to previous messageGo to next message
jaber
Messages: 2
Registered: December 2002
Junior Member
hi Ravi,
you need to copy the file named TNSNAMES.ORA from this folder
C:OracleOra81NETWORKADMIN
to this folder
C:ORAWIN95Ora92NET80ADMIN
TNSNAME.ORA have to be in the developer in order to understand where the database is.
or you can create a new file named TNSNAMES.ORA in the mentioned folder and paste these lines
NEEDB.ANDRSN01.TN.COMCAST.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oemcomputer)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = NEEDB)
)
)

its tells where the listener is.
Re: ORA-12154 : TNS: Could Not Resolve Service Names [message #81079 is a reply to message #81070] Fri, 03 January 2003 14:03 Go to previous messageGo to next message
Ravi
Messages: 251
Registered: June 1998
Senior Member
Hello,

I copied the TNSNAMES.ORA file from
C:OracleOra81NETWORKADMIN
to C:ORAWIN95NETWORKADMIN folder and tried to connect from froms to databse, but got same error.

Thanks,
Ravi.
Re: ORA-12154 : TNS: Could Not Resolve Service Names [message #81098 is a reply to message #81070] Mon, 06 January 2003 23:36 Go to previous message
bill
Messages: 75
Registered: November 1999
Member
Hi Ravi,

You have to understand that, the client "Forms/reports" in ur case has to know the location of Database. To enable this, the TNSNAMES.ora file keeps all the information for the various databases u may have. The default location of the TNSNAMES.ORA is $orahomenetworkadmin where $orahome is your path where u have installed the client/Dev 2k. sometimes, when u use Net8, the default path is $orahomenet8admin. In case u have both the directories..(Networkadmin and Net8admin) ensure u have same TNSNAMES.ora in both the directories. As it will make sure that at least one TNSNAMES.ora is available irrespective of the location.

The TNSNAMES.ora in ur ora81networkadmin is for the personal Oracle server and its utilities. So it is required to have TNSNAMES.ora in that location as well to run ur server utilities.

One crude way of doing it is to search for TNSNAMES.ora in ur C: drive. Replace all the existence of it with the real TNSNAMES.ora file. The ones in networkadminSAMPLE Directory need not be replaced as they are just the samples and has no effect on it.

Hope this helps.

Bill
Previous Topic: Any Tool or Method to Find out the Diff in Code betn two forms
Next Topic: Load data from text file to oracle database
Goto Forum:
  


Current Time: Thu Mar 28 15:06:12 CDT 2024