SAP Sybase IQ and ODBC (Linux/UNIX)

Connecting to SAP SAP_IQSybase’s IQ server shouldn’t be scary but the documentation leaves a lot to be desired. Log on to your favorite Linux or Unix box and make sure you source the IQ.sh file wherever you installed the software.

Let’s use the following hypothetical server:

IQ Server:  MyIQboxOfDoom
Port:  5000
Hostname: myiqboxofdoom

If you want a single odbc.ini file for all users, you’ll need to create the file and store it somewhere. Make sure you set the ODBCINI environment variable somewhere (NOT the IQ.sh file as it will but overwritten anytime you patch IQ) to the file. For example: export ODBCINI=/opt/databases/odbc.ini

If you want each user to have their own odbc.ini file, they will need to create the file named as ${HOME}/.odbc.ini The format will be the same as odbc.ini
odbc.ini / .odbc.ini contents:

[MyIQboxOfDoom]
CommLinks=tcpip(ip=myiqboxofdoom;port=5000;DOBROADCAST=NONE;VERIFY=NO)
AutoStop=no

Connecting is a simple matter of:

dbisql -c "dsn=MyIQboxOfDoom;uid=myuser;pwd=mypass" -nogui

Of course you could embed the user in the odbc.ini file like so:

[MyIQboxOfDoom]
CommLinks=tcpip(ip=myiqboxofdoom;port=5000;DOBROADCAST=NONE;VERIFY=NO)
AutoStop=no
uid=myuser
Share Button

One Reply to “SAP Sybase IQ and ODBC (Linux/UNIX)”

  1. Hello,

    Kindly ask for your help! I am trying to setup a connection using ODBC and a DB Link from an Oracle 11.2.0.4 DB to a SAP IQ16 database without success for a few weeks now.
    I downloaded and installed on the Linux system where I have the Oracle DB and Oracle Gateway running the ODBC drivers for SAP found in the Linux SYBASE IQ NETWORK CLIENT 16.0 package.
    I have created the initSID.ora file in the $ORACLE_HOME/hs/admin, I have entered the service in the listener configuration file, I have created a odbc.ini file found in /etc/odbc.ini, but all without luck.
    I currently have the following error message:

    ORA-28511: lost RPC connection to heterogeneous remote agent using SID=ORA-28511: lost RPC connection to heterogeneous remote agent using SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=IP_ADDRESS)(PORT=1522))(CONNECT_DATA=(SID=dwhdb)))
    ORA-02063: preceding line from DB_LINK
    Process ID: 119201
    Session ID: 1022 Serial number: 1853

    —/etc/odbc.ini
    [dwhdb]
    Description = Sybase IQ ODBC
    UserID =
    Password =
    Driver = /opt/sybase/IQ-16_0/lib64/libdbodbc11.so
    Servername =
    Port =
    Database = dwhdb –name_of_SAP_IQ_16_DB

    –listener file

    (SID_DESC=
    (SID_NAME=dwhdb)
    (ORACLE_HOME=<Oracle_HOME_for_the_ORACLE_GATEWAY)
    (PROGRAM=$ORACLE_HOME_GATEWAY/gw/bin/dg4odbc)
    (ENVS ="LD_LIBRARY_PATH=$ORACLE_HOME_GATEWAY/gw/lib:/usr/lib:$ORACLE_HOME_GATEWAY/lib")

    –initdwhdb.ora — found in $ORACLE_HOME_GATEWAY/hs/admin

    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = dwhdb
    HS_FDS_TRACE_LEVEL = 4
    HS_FDS_SHAREABLE_NAME = /opt/sybase/IQ-16_0/lib64/libodbc.so

    #
    # ODBC specific environment variables
    #
    set ODBCINI=/etc/odbc.ini

    HS_FDS_SUPPORT_STATISTICS = FALSE

    Thank you!
    Please help!

    🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.