Application Service Guide > Connecting to Databases from UNIX > Connecting to an Informix Database from UNIX
  

Connecting to an Informix Database from UNIX

Use ODBC to connect to an Informix database on UNIX.

Configuring ODBC Connectivity

You can configure ODBC connectivity to an Informix database.
The following steps provide a guideline for configuring ODBC connectivity. For specific instructions, see the database documentation.
  1. 1. Set the ODBCHOME environment variable to the ODBC installation directory. For example:
  2. Using a Bourne shell:
    $ ODBCHOME=<Informatica server home>/ODBC7.1; export ODBCHOME
    Using a C shell:
    $ setenv ODBCHOME <Informatica server home>/ODBC7.1
  3. 2. Set the ODBCINI environment variable to the location of the odbc.ini file. For example, if the odbc.ini file is in the $ODBCHOME directory:
  4. Using a Bourne shell:
    ODBCINI=$ODBCHOME/odbc.ini; export ODBCINI
    Using a C shell:
    $ setenv ODBCINI $ODBCHOME/odbc.ini
  5. 3. Edit the existing odbc.ini file in the $ODBCHOME directory or copy this odbc.ini file to the UNIX home directory and edit it.
  6. $ cp $ODBCHOME/odbc.ini $HOME/.odbc.ini
  7. 4. Add an entry for the Informix data source under the section [ODBC Data Sources] and configure the data source. For example:
  8. [Informix Wire Protocol]
    Driver=/export/home/Informatica/10.0.0/ODBC7.1/lib/DWifcl27.so
    Description=DataDirect 7.1 Informix Wire Protocol
    AlternateServers=
    ApplicationUsingThreads=1
    CancelDetectInterval=0
    ConnectionRetryCount=0
    ConnectionRetryDelay=3
    Database=<database_name>
    HostName=<Informix_host>
    LoadBalancing=0
    LogonID=
    Password=
    PortNumber=<Informix_server_port>
    ReportCodePageConversionErrors=0
    ServerName=<Informix_server>
    TrimBlankFromIndexName=1
  9. 5. Set the PATH and shared library environment variables by executing the script odbc.sh or odbc.csh in the $ODBCHOME directory.
  10. Using a Bourne shell:
    sh odbc.sh
    Using a C shell:
    source odbc.csh
  11. 6. Verify that you can connect to the Informix database using the ODBC data source. If the connection fails, see the database documentation.