?
Solved

ORA-12154: TNS:could not resolve service name

Posted on 2005-05-10
6
Medium Priority
?
791 Views
Last Modified: 2008-02-01
I have a VB6 project.  When I run it from with in the VB6 development enviornmnet the database connections works.  However, when I compile the project, the same code gives the following set of errors when the EXE is ran.

Error No: 00001 An error occurred while connecting to the 'FMIMSDEVLSC' database.

ORA-12154: TNS:could not resolve service name
0
Comment
Question by:ljpitre
5 Comments
 
LVL 5

Expert Comment

by:SaxonWica
ID: 13974351
Did you run the exe from another computer?
0
 
LVL 8

Expert Comment

by:tomvergote
ID: 13976622
Check your TNSnames.ora configuration file
0
 

Author Comment

by:ljpitre
ID: 13977182
I found the cause. The folder name of the project was "FMIMS_VB(EXE)"  The runtime (EXE) did not like the (EXE) in the folder name.  When I removed the () from the folder name, the runtime version worked ok.  I do not understand why the parenthesis as part of the folder name where the EXE was stored caused a TNS error.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14219540
PAQed with points refunded (500)

modulo
Community Support Moderator
0
 

Expert Comment

by:quaylochjack
ID: 23959424
Hello.

Just a comment. I had a problem with ORA 12154 Unable to resolve TNSNames.... and I think the underlying cause was similar to this.....

Story: I was running an applet (developed in VB) to query against an Oracle db.... using Oracle 8 client.... everything fine...... then installed Oracle 9i client.... changed out ODBC (Test connection ok) ...... but the VB applet would no longer connect...got the ORA 12154...

So... used other (non VB) apps to test connections.... all okay.... just the VB applet would not connect....  

Now, to clarify, I must admit that the fact of it being "VB" or "Not VB" did not occur to me while I was investigating.... until I read this posting and the thing about EXE being in the folder name..... when I looked at my install folder it did not have EXE in the folder name, but what it did have was parenthesis () in the folder name...... did a quick experiment.... tried running applet and connecting to db first with the exe in a folder with parenthesis, then in a folder without parenthesis.... sure enough, the brackets in the folder name were the problem...

So.. problem solved for me but I do not know why.... ie is it an Oracle 9 thing? is it a VB thing? or combo of both?
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question