ORA-12154: TNS:could not resolve service name

Posted on 2005-05-10
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
Question by:ljpitre
    LVL 5

    Expert Comment

    Did you run the exe from another computer?
    LVL 8

    Expert Comment

    Check your TNSnames.ora configuration file

    Author Comment

    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.

    Accepted Solution

    PAQed with points refunded (500)

    Community Support Moderator

    Expert Comment


    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 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?

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    ShiftLeft challenge 21 52
    mergeTwo  challenge 13 56
    find a node in VST 2 37
    allStar challenge 1 27
    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    This is about my first experience with programming Arduino.
    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 …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now