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!

TNS-03505: Failed to resolve Name

Discussion in 'General' started by SudeepShakya, Aug 13, 2011.

  1. SudeepShakya

    SudeepShakya Active Member

    Messages:
    33
    Likes Received:
    1
    Trophy Points:
    90
    Location:
    Kathmandu,Nepal
    when i used tnsping last time i worked fine but now it doesn't and displays following error:

    TNS-03505: Failed to resolve name

    but the connection works fine while connecting from SQL Developer,jDeveloper and others

    i have attached image what i did
     

    Attached Files:

  2. apps_expert

    apps_expert Forum Expert

    Messages:
    325
    Likes Received:
    28
    Trophy Points:
    330
    Location:
    Chennai, India
    Is your listener service up and running?

    If yes, do you have multiple oracle homes? If yes, did you set TNS_ADMIN?

    If you do have multiple oracle homes, try this. From Command prompt, Defin TNS_ADMIN for the current Command Prompt session.

    For example:

    C:\> set tns_admin=c:\oracle\network\admin (set this to your own "admin" folder)

    After you do that try tnsping again and see what happens. If it works, you should set TNS_ADMIN variable in the OS environment variables.
     
    SudeepShakya likes this.
  3. SudeepShakya

    SudeepShakya Active Member

    Messages:
    33
    Likes Received:
    1
    Trophy Points:
    90
    Location:
    Kathmandu,Nepal
    it didn't work
    so i think i have to reinstall Oracle bcoz i don't have much time
    if any other solutions ???
    please reply fast
    thank u for ur help
     
  4. SudeepShakya

    SudeepShakya Active Member

    Messages:
    33
    Likes Received:
    1
    Trophy Points:
    90
    Location:
    Kathmandu,Nepal
    i viewed the Net Manager and i noticed that last time i saw orcl somewhere but this time the orcl is nowhere
    i think something is missing there
    the tnslsnr.exe is also running and i can connect the databases also
    the only problem is i cannot tnsping
    As i remember that, i think this problem started when i created a new admin user account on windows and now i have deleted the user account which i was previously using(ie when i installed Oracle for first time)
    does this user account has some relation with this problem???
     
  5. apps_expert

    apps_expert Forum Expert

    Messages:
    325
    Likes Received:
    28
    Trophy Points:
    330
    Location:
    Chennai, India
    I doubt it. Creating Admin account in windows shouldn't alter tnsping behaviour.

    Basically what "TNS-03505: Failed to resolve Name" means is that the specified database name (in your case "orcl") was not found in the tnsnames.ora, onames or ldap. This means that the client hasn't even got as far as trying to make contact with a server - it simply can't find any record of the database that you are trying to connect to.
     
  6. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Most likely you have more than one tnsnames.ora file on your system, and SQL Developer, JDeveloper, et al are using a copy which contains an entry for orcl/ORCL. Search your system for tnsnames.ora files; find the one that works and copy it to the non-working destination (the location listed under the "Used parameter files:" text).
     
    SudeepShakya likes this.
  7. SudeepShakya

    SudeepShakya Active Member

    Messages:
    33
    Likes Received:
    1
    Trophy Points:
    90
    Location:
    Kathmandu,Nepal
    thank u all for ur support
    as i have less time i have reinstalled the oracle
     
  8. sraponn

    sraponn Guest

    do this step by step and i think you can resolve the issue

    step 1: is your listener up , if not start your listener and connect to the database.
    step 2: on your client side check for the tnsnames.ora file , open it check for the alias name that you have specified there , change it if necessary then save and quit.
    step 3:do ping operation ie (tnsping <alias name>)
    step 4 : now it will work for sure


    the reason you get this error is the alias name you are specifying should be wrong .hope this helps :)