[unixODBC-support] unixODBC + OCI

chris at luethy.net chris at luethy.net
Mon Nov 7 20:40:43 GMT 2005


Hello,
        I have a working installation of Oracle Instant Client 10g on a
Fedora Core 4 box with unixODBC installed from source at
/usr/local/unixodbc. I have a working Oracle sqlplus on this box,
so I know things like my TNS_ADMIN and tnsnames.ora file are set
up correctly.
        I also have installed Oracle's ODBC drivers, which accepted
unixODBC as a valid ODBC interface. It added an entry to
/usr/local/unixodbc/etc/odbcinst.ini and to my ~/.odbc.ini.
        To my user's odbc.ini it added the DSN "OracleODBC-10g", but when
I attempt to use this DSN, I receive:

isql -v OracleODBC-10g
[S1000][unixODBC][Oracle][ODBC][Ora]ORA-12514: TNS:listener does not
currently know of service requested in connect descriptor

[ISQL]ERROR: Could not SQLConnect

        Apparently unixODBC's isql is trying to use a service name that
does not exist on my system. Indeed, looking at the OCI logs
(sqlnet.log) for this isql attempt, we see the new entry:

Fatal NI connect error 12514, connecting to:
 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=169.237.101.*)(CID=(PROGRAM=isql)(HOST=localhost.localdomain)(USER=root)))(ADDRESS=(PROTOCOL=TCP)(HOST=169.237.101.*)(PORT=1521)))

  VERSION INFORMATION:
        TNS for Linux: Version 10.2.0.1.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
  Time: 07-NOV-2005 12:36:38
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12564
    TNS-12564: Message 12564 not found; No message file for
product=network, facility=TNS
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0

        My question to the list is two. First, how do I correctly specify
the service name in my odbc.ini or wherever such that unixODBC
uses the service name I want and not 169.237.101.*. The service
name is supposed to be ASUCD. Indeed, when I use Oracle's sqlplus,
it lets me specify a service name (isqlplus user at ASUCD, which
connects successfully).
        Also, why is it connecting as the root user? I'm guessing because
I ran isql as root but this is not desired either. I also would
like to know how to specify the user.

        I tried some stabs in the dark like isql DSN user at ASUCD (ASUCD is
my desired SERVICE_NAME) as well as adding a "ServiceName = ASUCD"
to my odbc.ini but all these attempts failed.

        In short, how do I specify what service_name isql/unixODBC sends
to the driver?

Thank you for your time,
Chris Thielen
Creative Media




More information about the unixODBC-support mailing list