This discussion is archived
2 Replies Latest reply: Jan 10, 2013 7:59 AM by 983814 RSS

ORA-12154: TNS:could not resolve the connect identifier speci

983814 Newbie
Currently Being Moderated
Getting this Error on our new windows 7 64bit OS
i am running both in the App and Ora in the XP compatibility mode.

"
A database error occurred in OCILogon (-1).
ORA-12154: TNS:could not resolve the connect identifier specified

<null>
"

The debug Console give's the following message.

"App Debug Console enabled
(switched to code page 1252)
ORASP>orasp_oci_open: ORA-12154: TNS:could not resolve the connect identifier specified
"

I can make the conection to the db by Loging directly into the Oracle SQL using the same info as my sams.
the conection works fine on our old XP OS....
any idea what i have to do to get this to run on Windows 7
thanks
  • 1. Re: ORA-12154: TNS:could not resolve the connect identifier speci
    Kalyan Pasupuleti-Oracle Expert
    Currently Being Moderated
    Hi,


    1) Check the tnsnames.ora file you are using, verify that it is accessible.
    Eg: On Unix:
    - Check if you have a $HOME/.tnsnames.ora file - This will be
    used in addition to 'tnsnames.ora'.
    - Check TNS_ADMIN is set in your environment.
    - There is a readable tnsnames.ora file in $TNS_ADMIN

    2) Ensure that the tnsnames.ora file contains a line of the form
    'alias=(...)' for the alias you are specifying.
    Aliases are NOT case sensitive.

    3) Make sure that there are no mismatched parentheses in the
    tnsnames.ora file.

         4) Even if TNS_ADMIN is set SQL*Net looks in other locations for
         configuration files. Check the default directories for old (or bad)
         copies of TNS_NAMES.ORA. Eg: /etc, /var/opt/oracle,
         $ORACLE_HOME/network/admin

    5) Check the default domain name being used, and the path used to
    locate aliases, in the SQLNET.ORA file.
    The default domain is specified in the NAMES.DEFAULT_DOMAIN
    parameter - this is appended to the alias specified in the
    connect string if there is no domain given.
    Eg: If NAMES.DEFAULT_DOMAIN=mydom.uk
    and a connect to "scott/tiger@mydb" is requested
    SQL*Net will look for the alias "mydb.mydom.uk"
    If NAMES.DIRECTORY_PATH is also specified this determines where
    SQL*Net looks for the alias expansion.

    6) If none of these show an error enable client side tracing
    at level 16 and see what has been written to the client trace
    file. There list of aliases in the trace file under the heading
    'TNS.NAMES.ORA TABLE HAS THE FOLLOWING CONTENTS'.

    7) If ORA-12154 is returned when selecting over a database link from a
    client check that the alias in the link can be resolved in the
    tnsnames.ora file ON THE SERVER.

    8) If you are connecting from a login dialog box, verify that you are
    not placing an "@" symbol before your connect net service name.

    9) When going from Windows to Linux/Unix platforms,
    you can see <carriage return> <new line> characters at the
    end of each line instead of <new line> <new line>. Be sure you
    use ascii mode when ftp'ing this between Windows and Linux/Unix.


    Regards,
    Kal
  • 2. Re: ORA-12154: TNS:could not resolve the connect identifier speci
    983814 Newbie
    Currently Being Moderated
    Thank you,
    I should have known to check the report and output file. This totally point out the error. i had to force the app to instal under the Program files and Not to the (x86).

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points