Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata


 This section provides information about the unixODBC driver manager and the SAP MaxDB ODBC driver.
Let us assume, that on your Linux box unixODBC is already installed (some distributions contain unixODBC by default), and you want to use it with the SAP MaxDB ODBC driver.

  1.  Check for installation, when using unixODBC, please install release 2.3.0 or later (check with "isql --version")

    >isql --version
    unixODBC 2.3.0

    Here, unixODBC version 2.3.0 is installed. "isql" is a query tool of unixODBC.

  2.  Check for the MaxDB ODBC driver:
    unixODBC needs the driver as shared library usually denoted by the suffix ".so". The MaxDB ODBC driver until release 7.6 has the name and for release 7.7 and following.
  3.  Define a DSN (data source name) for using with unixODBC: unixODBC looks for user specific definitions in the user's home directory in the file ".odbc.ini" (note the leading dot in the file name). The search order for ODBCINI is:
    1.     Evaluate the $ODBCINI variable as filename for DSN definitions
    2.     $HOME/.odbc.ini
    3.     /etc/odbc.ini
    . I.e. you do not need administration rights to use the MaxDB ODBC driver. Edit "~/.odbc.ini" and add following example defining a DSN "largedb":

    ServerDB=<name of the database>
    ServerNode=<IP addresse or host name of the database server>
    Driver=<path to your MaxDB ODBC installation>/
  4.  Test your DSN with isql assuming that the user ODBC exists with password ODBC:

    >isql largedb ODBC ODBC
    | Connected!                            |
    |                                       |
    | sql-statement                         |
    | help [tablename]                      |
    | quit                                  |
    |                                       |
    SQL> select now() from dual
    | EXPRESSION1               |
    | 2008-11-05 17:26:38.984000|
    SQLRowCount returns 1
    1 rows fetched
  5.  That's all!

This example serves only as a very first step to use the MaxDB ODBC driver with unixODBC. For more details (usage and administration of unixODBC) please look at