tns names could not resolve service name
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: tns names could not resolve service name

  1. #1
    Join Date
    Jan 2001
    Posts
    318
    I know when you get this error message there should be something wrong with the tnsnames.ora file... But in this perticular case I cannot find whats wrong, can some one help please.

    I have pasted below is the text from tnsnames.ora file..
    ORCL81.WORLD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle816)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = ORACLE81))
    )



    I have 3 machines.
    1. Oracle816 which is a oracle 816 server.
    2. test1.. which has oracle 816 client installed
    3. test2.. which has oracle 805 client installed

    System User Id and password for server is ora/ora.
    ***I have done find all tnsnames.ora file on all of these machines and made sure that they all have the same text pasted above.

    I can login to sql plus or worksheet using ora/ora@orcl81
    from test2 machine but I cannot do the same from oracle816 and test1 machine.
    It gives me error saying..
    TNS:could not resolve service name.
    Where else is it looking for service name ?

    Why ? this has really puzzled me !
    Has anyone had this problem before, does anyone knows the solution ?
    Thanks for all your help in advance

    Sonali





    Sonali

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Double check the tnsnames.ora file present under $ORACLE_HOME/network/admin. You might have missed some info, like paranthesis or etc.

    Check your sqlnet.ora file under the above directory and check the information with the working server.

    IF you have any problem, please let us know.


    Check this link too:

    http://dbasupport.com/forums/showthr...?threadid=9971

    Sam


    [Edited by sambavan on 05-10-2001 at 03:02 PM]
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Jan 2001
    Posts
    318
    I did they are same. As a matter of fact I have copied tnsnames.ora file from the machine test2 where it is working to all locations of tnsnames.ora on oracle816.
    Here is the text from sqlnet file. It is also same on both machines.

    TRACE_LEVEL_CLIENT = OFF
    names.directory_path = (TNSNAMES, HOSTNAME)
    names.default_domain = world
    name.default_zone = world
    automatic_ipc = off

    thanks
    Sonali

  4. #4
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    try connecting as --

    ora/ora@orcl81.world


    - Rajeev

    Rajeev Suri

  5. #5
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Could you change the service_name to SID and try. Next try specifying the IP in the host. Compare it with this sample

    ORCL81.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE816)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = ORACLE81)
    (SRVR = SHARED)
    )
    )

    IF this does not work, I would like you to set the ORACLE_SID=Oracle81 in your environment variable and try connecting to the instance and confirm that you were able to connect by this method.

    If it doesn't work, I would suggest that you try reloading your listener as

    lsnrctl reload


    and try again.
    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  6. #6
    Join Date
    Apr 2001
    Posts
    151
    step1
    ping test2 from test2 and from test1 and oracle816.

    I have similar problem before.
    find your ip address (test2 ping test2)
    find your ip (test1/oracle816 ping test2)

    if ip returned not the same, check your network admin,
    test2 may have 2 network adaptor...

    last time, we disabled one and resovled the problem.

    give it a try
    Elin@trend

  7. #7
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Rajeev, that is the POINT.

    Hmmm, afternoon, after a good heavy lunch, I'm


    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  8. #8
    Join Date
    Jan 2001
    Posts
    318
    I wished I would have read Rajeev's reply before...I just got it to work and reading all these replies...
    What Rajeev said worked !! But not by setting it in tnsnames.ora file, but I had to do that using Oracle Net8 configuration assistant.
    I changed orcl81.world to orcl81

    One more thing , after I changed orcl81.world to orcl81
    using oracle net8 configuration assistant, I did not find that change in any of the tnsnames.ora file. It works now. But where did my change got written ???

    Whats the difference between using orcl81 and orcl81.world ??
    All oracle examples show .world ...
    Belive me I had tried everthing that SAM had mentioned... nothing was working !!
    Thats why I use this forum and like it #@%

    Thanks again
    Sonali

    Sonali

  9. #9
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    See if your sqlnet.ora file was updated (check the timestamp)

    I am not very clear about this but I think it's the combination of sqlnet.ora (names.default_domain = world) and tnsnames.ora that guide the whole thing.

    - Rajeev
    Rajeev Suri

  10. #10
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Here is something I'm posting with my

    http://www.oradoc.com/ora816/network...gcf.htm#448105

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width