Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Posts
    3

    Post Unanswered: Connecting to oracle via ODBC

    I have setup Personal Oracle 8.1.7 as localhost i.e. I want to setup my windows 2000 machine to be server and client.

    I can connect to oracle with TOAD, I have setup a listener and tnsnames but I can't connect via ODBC or through SQLPLUS.

    I get the following error:

    SQL*Plus: Release 8.1.7.0.0 - Production on Thu Aug 7 20:28:51 2003

    (c) Copyright 2000 Oracle Corporation. All rights reserved.

    ERROR:
    ORA-12541: TNS:no listener

    I have setup the listener:- the output of lsnrctl status

    C:\>lsnrctl status

    LSNRCTL for 32-bit Windows: Version 8.1.7.0.0 - Production on 07-AUG-2003 20:41:24

    (c) Copyright 1998 Oracle Corporation. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0. 1)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 8.1.7.0.0 - Production
    Start Date 07-AUG-2003 20:40:46
    Uptime 0 days 0 hr. 0 min. 37 sec
    Trace Level off
    Security OFF
    SNMP OFF
    Listener Parameter File D:\oracle\ora81\network\admin\listener.ora
    Listener Log File D:\oracle\ora81\network\log\listener.log
    Services Summary...
    PLSExtProc has 1 service handler(s)
    ULIVE has 1 service handler(s)
    The command completed successfully

    Output of listener.ora
    --------------------
    # LISTENER.ORA Network Configuration File: d:\oracle\ora81\network\admin\listener.ora
    # Generated by Oracle configuration tools.

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    )
    )

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = d:\oracle\ora81)
    (PROGRAM = extproc)
    )
    (SID_DESC =
    (GLOBAL_DBNAME = ULIVE)
    (ORACLE_HOME = D:\oracle\ora81)
    (SID_NAME = ULIVE)
    )
    )

    Output of tnsnames.ora
    ----------------------------

    # TNSNAMES.ORA Network Configuration File: d:\oracle\ora81\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.

    ULIVE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = ULIVE)
    )
    )

    Any suggestions why I connect to oracle using TOAD but not through ODBC or SQLPLUS


    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Maybe because TOAD (for all of it's other faults) has a great Oracle home and or TNS (for local instances) determination routine. I would imagine that it is working out things which SqlPlus doesn't or can't.

    Try using TNSPING to make sure you are using the right TNS name to connect, ie....

    TNSPING ULIVE
    TNSPING ULIVE.ULIVE
    TNSPING ULIVE.<local machine name>

    I've seen the Oracle installer do some very funny things with TNS entries especially on Domain Controllers and on machines with Localhost machine name set to <something>.com

    Hh
    Bill

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    from command line try:

    sqlplus username/password


    see if that connects (with no sid).
    Normally if you are connecting locally, you won't need the '@sid'

    This is just a work-around. Why are there problems connecting locally? I wish I was a Net8 expert. I need to run some tests and work on that side of my knowledge.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198

    Re: Connecting to oracle via ODBC

    Do you have a sqlnet.ora file. It should be in the
    c:\<oraclepath>\Network\ADMIN\ folder. It should have the Domain Name in it. Go back to the listener and put the ULIVE.<%DomainName%> and it will probably work.

    # SQLNET.ORA Network Configuration File: D:\oracle\ora81\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.

    NAMES.DEFAULT_DOMAIN = <%DomainName%>

    sqlnet.authentication_services = (BEQ,NONE)

    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

  5. #5
    Join Date
    Jul 2003
    Posts
    2,296

    Re: Connecting to oracle via ODBC

    Originally posted by jimpen
    Do you have a sqlnet.ora file. It should be in the
    c:\<oraclepath>\Network\ADMIN\ folder. It should have the Domain Name in it. Go back to the listener and put the ULIVE.<%DomainName%> and it will probably work.

    # SQLNET.ORA Network Configuration File: D:\oracle\ora81\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.

    NAMES.DEFAULT_DOMAIN = <%DomainName%>

    sqlnet.authentication_services = (BEQ,NONE)

    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
    Would his domain-name just be his Computers name?
    How would that be determined?

    I assume he could r-click My-Computer or something?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  6. #6
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198

    Re: Connecting to oracle via ODBC

    Originally posted by The_Duck
    Would his domain-name just be his Computers name?
    How would that be determined?

    I assume he could r-click My-Computer or something?
    A lot of times it defaults to WORLD, or sometimes it is the internal domain name of the company. It all depends what was entered in the configuration wizards and/or manually entered into the SQLNET.ORA during the install of the Oracle onto that machine. That is why he needs to see his SQLNET.ORA and read what is afte the equal sign on that line.

    NAMES.DEFAULT_DOMAIN = <%DomainName%>

    If you have access to metalink the "Note 69725.1: Configuring TNSNAMES.ORA, SQLNET.ORA and LISTENER.ORA Files in Net8" explains a little better than I can.

Posting Permissions

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