Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA 12154 TNS Could not resolve service name

Status
Not open for further replies.

cosmos77

Programmer
Oct 17, 2002
21
0
0
US
iam having problems using an Oracle Client to the Server which is on another machine.

i have changed the tnsnames.ora file to connect to the service name on another machine but when i try to connect through this service it gives the following message:

ORA 12154 TNS Could not resolve service name.

Any clue as to what may be wrong....
Any help would be appreciated.

Thanks,
Ajay

 
Be sure you are changing the correct tnsnames.ora. If you have multiple homes, you should have multiple tnsnames.ora. do a search on the oracle folder to find all occurrences of this file.
 
If you have multiple homes, you can try to keep all of the tnsnames.ora files synched up or simply set the TNS_ADMIN environmental variable to point to the directory you wish to make your "official" tnsnames directory.
 
hi..im also getting the same error message..
i have installed oracle 9i Personal edition on windows 98...
then i installed Developer 6i..after the installation, when i start oracle Form Builder, i cannot connect to the database. the user name and password i use are, Scott and Tiger. the Database name i have set while Oracle 9i installed was Oracle9i, but that also doesnt work. i have created a listerner in the tnsnames.ora, named as Test. that also doesnt work. what seems to be the problem..
 
Hi,
awaism, tnsnames.ora is rather used by oracle client to identify a database by its alias
If you want to configure your server's listner, you should add an entry in listener.ora
The message you get means that the client could'nt locate a database with the alias you provide, i.e. either that alias does'nt exist in your tnsnames.ora file(s) or it's described by wrong coordinates IP, port number (1521 by default), connection type (usually tcp).
Regards,
Zephan
 
hi Zephan...my files are in order...at least that's what i think...pls take a look and point out what to do next...

my listerner.ora is as follows..

# LISTENER.ORA Network Configuration File: d:\oracle\ora90\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 = awais)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\oracle\ora90)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = oracle9i)
(ORACLE_HOME = d:\oracle\ora90)
(SID_NAME = oracle9i)
)
)

and the tnsnames.ora is as follows..

# TNSNAMES.ORA Network Configuration File: d:\oracle\ora90\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE9I =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = awais)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = oracle9i)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = awais)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = )
)

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

test =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = awais)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORACLE9I)
)
)
 
hi Zephan..thanks for the response...my files are in order...at least that's what i think...pls take a look and point out what to do next...

my listerner.ora is as follows..

# LISTENER.ORA Network Configuration File: d:\oracle\ora90\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 = awais)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\oracle\ora90)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = oracle9i)
(ORACLE_HOME = d:\oracle\ora90)
(SID_NAME = oracle9i)
)
)

and the tnsnames.ora is as follows..

# TNSNAMES.ORA Network Configuration File: d:\oracle\ora90\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE9I =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = awais)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = oracle9i)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = awais)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = )
)

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

test =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = awais)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORACLE9I)
)
)
 
Can you connect from sql*plus located in 9i oracle home? If so, try to set TNS_ADMIN environment variable to point to <9i_home>\network\admin.

Regards, Dima
 
Ajay,
I ran into same problem trying to connect with 8.0 version of sqlplus to 9.2 database. Ended up installing new version with OEM to get it to work. Am still having difficulty getting forms6ir2 talking to Oracle 9.2. So would be interested in further comments to this post.
 
wondering if you guys are having the same problem that i am...here is my post:

thread759-741013 (Programmer) Jan 5, 2004
Just trying to install a trila version on my XP machine at home.

there is something called the net configuration
manager and its failing on Oracle 91/Developer Suite
disk 2 of 2 on the Configuration Tools Screen On the
Oracle Net Configuration Assistant. When it fails I think it
saves a generic tnsnames.ora and sqlnet.ora file that
are not complete and maybe some incomplete componets. I learned this from a help option and can see it in my tnsnames file. I may need these files from an
installation is that successful and not altered.
Otherwise I'm going to do some trial and error of
entering hosts and ports.

Has anyone seen this before?. I'm stuck because i can't even login to sql plus at this point to do anything.


 
I am having this same issue using Visual Studio in VB.NET. I was connecting to an Oracle db on another machine using the Ora Client but when I fully installed Oracle itself all of the connections are failing.
 
These configuration files (tnsnames.ora and sqlnet.ora) are home-specific: by default they are applied only within Oracle Home where they're installed. You may set TNS_ADMIN enviroment to point to the location of correct pair to be shared among all homes. Your clean install obviously contains only sample files. Of course you may also configure sql*net for that new home separately

Regards, Dima
 
Oddly enough, here is what I can accomplish:

Visual Studio can see the db in the Server Explorer
I can create a win app project and pluck records from the db
.NET can resolve the TNS name
Before my issue was with the length of the identifier being over 16 characters so I trimmed it.

Here is what I cannot accomplish:
I can't get an ASP.NET page to load and pull a value from the db using THE SAME EXACT connection string as in the win app. I get the ORA-12154 error.

Most unusual.
 
I have installed Oraqcle 9i on a XP machine. I tried logging in via sqlplus. I am getting the 'ORA 12154 TNS Could not resolve service name' error. I have checked the tnsnames.ora and listner.ora files and they look to be okay. What can I do to correct this? Thanks.
 
I have a problem w/ my laptop. I am installing windows 98 and I get to where it installs windown 98, then a message comes up saying that some files cannot be found. But my disc is in! What should I do to make it work?
 
My issue has finally been solved, here is what happened in my case. I had a box with the Oracle .NET provider on it so that I could develop using VS.NET against and Oracle instance on another machine. Eventually, we installed Oracle on that development machine itself and I started getting that Ora-12154 error. I did some f'ing with my TNS names file and eventually got to a point where I was not getting that TNS error anymore but I was getting 'could not locate oci.dll' instead (maybe that's progress). Then I uninstalled the .NET provider and reinstalled it and now things work almost alright. If I reboot the box and run a VB.NET project I get an error about 'could not create environment'. I then have to run ANY .Net project that has authenication true with a hard-coded password and then ALL of my web services run again until I reboot. Strange, but true.
 
I have some problems using Oracle 9.2 and Form6i. I can't connect Form6i to database Oracle 9.2 and gives the following message

Oracle Forms Builder - MODULE1 - [Object Navigator]: ifbld60.EXE - Application Error
The instruction at "0x67614564" referenced memmory at "0x000000160". The memmory could not be "written"
Click on OK to terminate the program
Click on CANCEL to debug the program

Thanks for your helping.

Thanks,
overdotnet
 
Overdotnet, can you explain how your post relates to ORA 12154 error? Pleas don't send duplicate messages as they will be red flagged.

Regards, Dima
 
I'm very sorry about my mistake. Thanks for your remind.

overdotnet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top