Results 1 to 12 of 12
  1. #1
    Join Date
    May 2003
    Posts
    369

    Unanswered: tns listener problems

    I am trying to add some database connections to my Oracle database client and server and keep getting the error:

    ERROR:
    ORA-12154: TNS:could not resolve service name

    But when I try to add the names to my listener.ora and tnsnames.ora file it still does not work and cannot get my listener to see the new connections. I am able to connect to the original instance, test2, but the listener cannot see dev3.

    tnsnames.ora file:

    INST1_HTTP.MYHOST.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = MSE)
    (PRESENTATION = http://Service)
    )
    )

    TEST2.MYHOST.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = TEST2)
    )
    )

    DEV3.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dev3.com)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = DEV3)
    )
    )

    listener.ora configuration

    # LISTENER.ORA Network Configuration File: C:\oracle\ora92\network\admin\listener.ora
    # Generated by Oracle configuration tools.

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    )
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
    )
    )
    )

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\ora92)
    (PROGRAM = extproc)
    )
    (SID_DESC =
    (GLOBAL_DBNAME = TEST2)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = TEST2)
    )
    )

    Can anyone help me so that I can add other SIDs to connect to from my Oracle client and server? Thanks.

  2. #2
    Join Date
    Oct 2004
    Posts
    145
    I am not sure what you are attempting to do?

    Are you simply trying to connect to dev3 instance on dev3.com box?

    If you are, the reason it is probably not connecting is the domain name.

    If TEST2.MYHOST.COM works change DEV3.COM to DEV3.MYHOST.COM. Your domain is set in sqlnet.ora.

    In order to connect to different instance on another box, you do NOT need to modify your local listener.ora file.

  3. #3
    Join Date
    May 2003
    Posts
    369

    Oracle listener and tnsnames on Windows

    I have an Oracle 9i database with client on a Windows XP system. However we have test databases on several remote servers that I need access to. When I added these to the tnsnames.ora file, I keep getting the TNS errors described earlier.

  4. #4
    Join Date
    Oct 2004
    Posts
    145
    Did you try changing the alias as per suggestion above?

    If you are able to connect to TEST2 alias and not DEV3, above suggestion should fix it (DEV3.MYHOST.COM instead of DEV3.COM).

    If it does not post contents of your sqlnet.ora file as well.

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Ready, Fire, AIM!
    http://download-west.oracle.com/docs...a96580/toc.htm

    http://download-west.oracle.com/docs...a96581/toc.htm


    While a listener can run on a system different from the actual DB server, I avoid doing so.

    I strongly suggest runing a 2nd listener on the dev3.com box in addition to the existing listener
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  6. #6
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    Is DEV3 a new instance on MYHOST.COM (ie hosted on the same single phsyical computer called MYHOST.COM) or is DEV3 on a completetely new machine.

    At the moment TNS is looking for an instance called DEV3.COM on a physical box called DEV3.COM. Considering your TEST2 is on MYHOST.COM i would think this unlikely, and that DEV3 is also on MYHOST.COM.

    Code:
    DEV3.MYHOST.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = DEV3)
    )
    )
    Hth
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

  7. #7
    Join Date
    May 2003
    Posts
    369

    remote db connections

    Actually I only have a single Oracle 9.2.0.4 database instance running on my Windows XP machine. The dilemma is I want to be able to not only access this instance, but to remote connect via sqlplus to about six other database instances on other servers. The tns listener fails to show these when I set them in my tnsnames.ora file.

  8. #8
    Join Date
    May 2003
    Posts
    369

    remote db connections

    Actually I only have a single Oracle 9.2.0.4 database instance running on my Windows XP machine. The dilemma is I want to be able to not only access this instance, but to remote connect via sqlplus to about six other database instances on other servers. The tns listener fails to show these when I set them in my tnsnames.ora file.

  9. #9
    Join Date
    May 2003
    Posts
    369

    remote db connections

    Actually I only have a single Oracle 9.2.0.4 database instance running on my Windows XP machine. The dilemma is I want to be able to not only access this instance, but to remote connect via sqlplus to about six other database instances on other servers. The tns listener fails to show these when I set them in my tnsnames.ora file.

  10. #10
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You are sorely confused about what the various SQL*Net files are for.
    Please go RTFM previous posted.
    Below are some lines from a tnsnames.ora file I've used in the past
    ==================================================
    hr =(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=remedy )(PORT=1521))(CONNECT_DATA=(SID=HR )))
    wrk =(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prod )(PORT=1529))(CONNECT_DATA=(SID=WRK )))
    cti =(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prod )(PORT=1529))(CONNECT_DATA=(SID=CTI )))
    edw =(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dss )(PORT=1521))(CONNECT_DATA=(SID=EDW )))
    ccc =(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=siebel )(PORT=1521))(CONNECT_DATA=(SID=CCC )))
    ================================================== ==
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  11. #11
    Join Date
    Dec 2004
    Location
    Apeldoorn, the Netherlands
    Posts
    9
    Quote Originally Posted by mixxalot
    Actually I only have a single Oracle 9.2.0.4 database instance running on my Windows XP machine. The dilemma is I want to be able to not only access this instance, but to remote connect via sqlplus to about six other database instances on other servers. The tns listener fails to show these when I set them in my tnsnames.ora file.
    Okay, as suggested above: RTFM !

    And please read and understand:

    You do NOT, NOT ,NOT need to add databases not on your machine to your local listener.

    Every server out there with oracle on it has it's own listener!!
    you use sql*net (sql*plus, whatever tool) that checks your tnsnames.ora, and then connects to the listener on the server!
    The listener then puts you through to the database..

  12. #12
    Join Date
    Oct 2004
    Posts
    145
    Hum..

    Step back a bit.

    My original understanding of this posting was.

    TEST2 oracle instance resides on machined named MYHOST. Hence listener.ora shown on the original posting.

    tnsnames.ora entry works for TEST2.MYHOST.COM but not for DEV3.COM.

    You probably set your domain name in your sqlnet.ora to MYHOST.COM and it is able to resove TEST2 connection but not DEV3. I have not seen contents of your sqlnet.ora nor heard if you have tried changing DEV3.COM entry in tnsnames.ora to DEV3.MYHOST.COM and attempt connect.

Posting Permissions

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