5 Replies Latest reply: Apr 28, 2012 2:16 PM by 933875 RSS

    Toad ORA-12154: TNS:could not resolve the connect identifier specified

    804076
      I'm installing oracle clients and tools on a new Windows 7 machine issued to me by my company.

      I installed a 64 bit 10.2.0.3 oracle client, but found that 64 bit installations don't work with TOAD. So I installed a 32 bit 10.2.0.1 oracle client. I also set up my TNS names files in the network/admin directory of both installations, set up the hosts files, and ensured that the registry information is accurate. I have no ORACLE_HOME environment variable because when I installed the 2nd installation of Oracle it said that I shouldn't have one since I have multiple versions of oracle and it erased it.

      I am able to connect and use SQL Plus and SQL Developer with both installations of Oracle, but I'm not able to connect with TOAD. TOAD finds the 32 bit installation and all of its registry information looks correct and TOAD says "The Oracle home is valid". TOAD also loads my TNS file and all associated IPs and everything looks good when I look at them in the the TNS Editor. I am also running TOAD as administrator in order to avoid "Can't initialize OCI. Error -1" errors.

      Yet, whenever I try to connect to any database, I get the following error:

      "ORA-12154: TNS:could not resolve the connect identifier specified" and then the database I am using

      Is there anything else I need to setup because I have multiple installations of Oracle? Or anything else I need to setup running on a 64 bit windows machine with 32 bit installations of oracle and toad?

      Thanks for any help you can give.
        • 1. Re: Toad ORA-12154: TNS:could not resolve the connect identifier specified
          804076
          And in case you want to know my registry information:

          64 bit installation:

          Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient10g_home2
          Class Name: Application Global Data
          Last Write Time: 10/5/2010 - 11:36 AM
          Value 0
          Name: ORACLE_HOME
          Type: REG_SZ
          Data: C:\oracle\product\10.2.0\client_2

          Value 1
          Name: ORACLE_HOME_NAME
          Type: REG_SZ
          Data: OraClient10g_home2

          Value 2
          Name: ORACLE_GROUP_NAME
          Type: REG_SZ
          Data: Oracle - OraClient10g_home2

          Value 3
          Name: ORACLE_BUNDLE_NAME
          Type: REG_SZ
          Data: Enterprise

          Value 4
          Name: NLS_LANG
          Type: REG_SZ
          Data:

          Value 5
          Name: OLEDB
          Type: REG_SZ
          Data: C:\oracle\product\10.2.0\client_2\oledb\mesg

          Value 6
          Name: StmtCacheSize
          Type: REG_SZ
          Data: 0

          Value 7
          Name: SQLPATH
          Type: REG_SZ
          Data: C:\oracle\product\10.2.0\client_2\dbs

          Value 8
          Name: ORACLE_HOME_KEY
          Type: REG_SZ
          Data: SOFTWARE\ORACLE\KEY_OraClient10g_home2


          32 bit installation:

          Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_OraClient10g_home1
          Class Name: Application Global Data
          Last Write Time: 10/6/2010 - 12:42 PM
          Value 0
          Name: ORACLE_HOME
          Type: REG_SZ
          Data: C:\oracle\product\10.2.0\client_3

          Value 1
          Name: ORACLE_HOME_NAME
          Type: REG_SZ
          Data: OraClient10g_home1

          Value 2
          Name: ORACLE_GROUP_NAME
          Type: REG_SZ
          Data: Oracle - OraClient10g_home1

          Value 3
          Name: ORACLE_BUNDLE_NAME
          Type: REG_SZ
          Data: Enterprise

          Value 4
          Name: NLS_LANG
          Type: REG_SZ
          Data: AMERICAN_AMERICA.WE8MSWIN1252

          Value 5
          Name: SQLPATH
          Type: REG_SZ
          Data: C:\oracle\product\10.2.0\client_3\dbs

          Value 6
          Name: ORACLE_HOME_KEY
          Type: REG_SZ
          Data: SOFTWARE\ORACLE\KEY_OraClient10g_home1



          And my environment variables:

          TNS_ADMIN: C:\Oracle\product\10.2.0\client_3\NETWORK\ADMIN

          PATH: "C:\oracle\product\10.2.0\client_3\bin;C:\oracle\p roduct\10.2.0\client_2\bin;%SystemRoot%\system32;% SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT %\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin"

          The string "C:\oracle\product\10.2.0\client_3\bin" is the bin directory for my 32 bit installation.

          The string "C:\oracle\product\10.2.0\client_2\bin" is the bin directory for my 64 bit installation.
          • 2. Re: Toad ORA-12154: TNS:could not resolve the connect identifier specified
            sybrand_b
            <rant>
            1000000000000000000000000000000000000 users have asked this question here before
            because

            - they couldn't be bothered to read documentation
            - they couldn't be bothered to Google
            - they couldn't be bothered to search this forum.

            The question is WHYYYYYYYYYYYYYYYYYYYYYYYYY is everyone showing they are LAZYYYYYYYYYYYYYYYYYYY
            </rant>

            The answer is you need to set TNS_ADMIN to the directory where the correct tnsnames.ora is located.

            ------------------------
            Sybrand Bakker
            Senior Oracle DBA
            • 3. Re: Toad ORA-12154: TNS:could not resolve the connect identifier specified
              802075
              This may help:

              http://www.synergys.ca/index.php?option=com_lyftenbloggie&category=installation&Itemid=68&lang=en

              Apparently there are issues when installing the 32 bit version of TOAD into a directory that contains '()' chracters.

              Dave
              • 4. Re: Toad ORA-12154: TNS:could not resolve the connect identifier specified
                804076
                I have been searching google and working on this issue all week. All of the posts for this type of problem that I have found have had solutions for thing I have configured correctly. And Both my local tech staff as well as my company's national tech staff haven't been able to help me. That is why I am posting.

                And if you look at my post, you can see that my TNS_ADMIN environment variable is set to the correct path for my 32 bit oracle installation.
                • 5. Re: Toad ORA-12154: TNS:could not resolve the connect identifier specified
                  933875
                  You may well rant but coming from a MSSQL background I am staggered that something as critical as this isn't managed by the installer. If nothing else I did Google and found your rant. Thanks it worked like a charm.