How to set up ODBC for Oracle on Solaris with unixODBC driver manager

Posted on 2007-10-04
Last Modified: 2013-12-27
I am trying to follow the metalink doc to set up ODBC connections:,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,363899.1,1,0,1,helvetica

But I got the following error:

oracle@ors2di # ./doit
make: Fatal error in reader: /opt/app/oracle/product/10.2.0/db_1/odbc/lib/, line 1422: Unexpected end of line seen
./doit: ./odbcsel1: not found
oracle@ors2di #
Question by:geotiger
    LVL 12

    Author Comment

    Here is what I have done  so far:

    1 .Install unixODBC driver
        # pkg-get -i unixodbc
    2. Configure DNS
    root@ors2di # more odbcinst.ini
    Description             = Oracle 10g R2 ODBC driver.
    Driver          = /opt/app/oracle/product/10.2.0/db_1/lib/
    Setup           =
    FileUsage               =
    CPTimeout               =
    CPReuse         =
    UsageCount              = 1

    root@ors2di # more odbc.ini
    Application Attributes          = T
    Attributes              = W
    BatchAutocommitMode             = IfAllSuccessful
    CloseCursor             = T
    DisableDPM              = F
    DisableMTS              = T
    Driver          = owb1odbc
    DSN             = ora102
    EXECSchemaOpt           =
    EXECSyntax              = T
    Failover                = T
    FailoverDelay           = 10
    FailoverRetryCount              = 10
    FetchBufferSize         = 64000
    ForceWCHAR              = F
    Lobs            = T
    Longs           = T
    MetadataIdDefault               = F
    QueryTimeout            = T
    ResultSets              = T
    ServerName              = owb1
    SQLGetData extensions           = F
    Translation DLL         =
    Translation Option              = 0
    UserID          = std_rep

    root@ors2di #

    3. test it
    oracle@ors2di # pwd
    oracle@ors2di # more doit
    export SAMPL
    rm -rf $SAMPL".o"
    rm -rf $SAMPL
    export LD_LIBRARY_PATH
    /usr/ccs/bin/make -f build OBJS=$SAMPL".o" EXE=$SAMPL

    oracle@ors2di # isql -v ora102 scott tiger
    [01000][unixODBC][Driver Manager]Can't open lib '/opt/app/oracle/product/10.2.0/db_1/lib/' : isql: fatal: /opt/app/oracle/product/10.2.0/db_1/lib/ wrong ELF class: ELFCLASS64
    [ISQL]ERROR: Could not SQLConnect
    oracle@ors2di #
    LVL 47

    Accepted Solution

    To be able to successfully create a two tier connection to a 64-bit Oracle on a 64-bit Solaris machine, include Oracle 32-bit libraries in the PATH.

    The binaries are often located in the lib32 directory. For example:
    This path should be included in the LD_LIBRARY_PATH to make the two tier connection work in a 64-bit environment.

    Also, verify the path is placed before the paths to other Oracle libraries.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
    This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
    This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now