1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

ORA-12154:TNS:could not resolve the connect identifer specified

Discussion in 'SQL PL/SQL' started by Frank Handy, Oct 6, 2010.

  1. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Hi, getting "ORA-12154:TNS:could not resolve the connect identifer specified " message when I try to connect to ORACLE using TOAD. I have the ORACLE client installed and the tnsnames.ora is in the network\admin directory. I had no problems using the same tnsnames.ora before I laptop was reimaged last week after it crashed. Any ideas?
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Have you verified that tnsping works for the remote database in question? If it works for the client but not for TOAD you may have a configuration issue with TOAD or there may be a second tnsnames.ora file TOAD is using that does not have that database configured.
     
    Frank Handy likes this.
  3. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Thanks for your reply. tnsping comes back ok. Is there anyway I can find out if there is a configuration issue with TOAD. Also is there anyway I can find out if TOAD is using a different TNSNAMES.ORA. As I said TOAD worked for me last week before I got my laptop reimaged
     
  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    My thoughts are if TOAD was using your properly configured tnsnames.ora file you wouldn't receive this error. Search your laptop for tnsnames.ora files and see how many show in the list.
     
  5. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Thanks again. I have 7 tnsnames.ora files on my C: drive all under the oracle directory. All files are exactly the same, they are just in different directories.
     
  6. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Post the version of TOAD you're using, please.
     
  7. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Thanks again. The version is Toad for Oracle Base. Version 10.0.0.41.
     
  8. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Turn on sql*net tracing as that may show you something you've missed.
     
  9. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Hi, can you tell me how I can turn sql*net tracing on? Thanks.
     
  10. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Edit the local sqlnet.ora file and set TRACE_LEVEL_CLIENT=16
     
  11. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Also, just because they all have the same name doesn't mean that they all have the same contents.
     
  12. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Thanks for your reply again. I set TRACE_LEVEL_CLIENT=16, but I cannot see anything different. Where should I be able to see the trace. I looked in C:\oracle\product\10.2.0\client_2\NETWORK\log, C:\oracle\product\10.2.0\client_2\NETWORK\trace and C:\oracle\product\10.2.0\client_2\NETWORK\ADMIN.
     
  13. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Then you've set it in the wrong sqlnet.ora file; if you have 7 tnsnames.ora files I expect you also have 7 sqlnet.ora files. TNSPING will tell you which file it's using.
     
  14. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Again thanks for your help on this. The contents of all 7 tnsnames.ora are the same. I only have 1 sqlnet.ora and this is the one I am using when I check usingtnsping. Any other ideas?
     
  15. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    This is only the Oracle client software installed on your laptop?
     
  16. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Thanks for helping me. The answer is yesr and no. The first I installed the ORACLE client I had a problem, so I installed it again. On my C: drive I have a directory called oracle. In that there is a sub directory called product. In that this is a sub directory called 10.2.0. In that there are two sub directories called client_1 and client_2. Client_1 is the first install and client_2 is the second install. There is nothing in client_1 except for three files called install.platform, oraociei10.dll and orasqlplisic10.dll. Clinet_2 has the full install. Just a thought maybe is it something to do with registry settings and the first install not being correct?
     
  17. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    That is a possibility; check your registry and see which home is shown as being used. You may also have an Oracle Home Selector installed and running that utility will display the active home.
     
  18. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Thanks again. Do you know where I should look in the registey editor as there is no oracle directory under software.
     
  19. Frank Handy

    Frank Handy Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Sorry, Found the ORACLE directory. The oracle home is C:\oracle\product\10.2.0\client_2 which is the correct directory.
     
  20. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Without seeing your laptop and its registry contents I can't troubleshoot this situation any further. It appears the reimaging has set something in the registry incorrectly but I cannot know what that might be without access to your computer.

    You could save a copy of your tnsnames.ora file and attempt a new installation of the client software.