The following sums up the steps needed to configure DataStage on Unix to access AIS for both CDC and data access, as well as some troubleshooting tips.

Environment:

The following assumes:

  1. Full 32 bit AIS installation on Unix (as opposed to thin odbc client).
  2. Use of BindUrl to access AIS servers.


Note that most of the following also applies to thin client (32/64) and to local static connections (as opposed to bindurl).

Steps:

  1. Install AIS on DataStage Unix machine.
  2. Make sure that the datastage user has r/w access to the AIS installation tree. Please note that write access is needed as well as read access.
  3. Add to the DataStage DSENV file (in $DSHOME) a line running the AIS nav_login.sh script. This should look something like the following (may vary depending on path and shell):

    source /home/attunity/navroot/bin/nav_login.sh
  4. Add a DSN entry to the $ODBCINI file similar to the following:

    [AISDSN_SAMPLE]
    Driver=/home/attunity/navroot/lib/navcli.so
    Description=Attunity sample DSN entry
    BindUrl=192.168.0.126:2551/TESTCDC_SA
    DefTDPName=TESTCDC_SA
    debug/logFile=/home/attunity/navroot/tmp/testcdc_sa_%p.log


Troubleshooting:

The following are good steps to take in case connection is not successful.

  1. Login to the DataStage account.
  2. In case account profile does not include it - run DSENV to setup your environment.
  3. Run the following command to rule check the AIS connectivity to server (adjust for your parameters):

    nav_util execute -b BindUrl=192.168.0.126:2551/TESTCDC_SA TESTCDC_SA

    If unsuccessful explore server setup or network/firewall issues.
  4. In the $DSHOME/branded_odbc/bin you will find a test program that tests if a driver can be loaded (ivtestlib) Run this program on the navcli.so driver:

    $DSHOME/branded_odbc/bin/ivtestlib /home/attunity/navroot/lib/navcli.so

    note that you may get some warning about version information - this is insignificant as long as load was successful. If not successful, please check LD_LIBRARY_PATH and verify that nav_login.sh was successfully run.
  5. In the $DSHOME/branded_odbc/demo directory you will find a demoodbc program that can check odbc connectivity at the $ODBCINI level. Run it using:

    $DSHOME/branded_odbc/demo/demoodbc -uid user -pwd password AISDSN_SAMPLE

    Note that this program connects to the DSN and issues "select * from emp". So we don't really expect a successful run, but we would like to see a sensible message about emp not existing or something like that. The username/password cannot be omitted unfortunately because otherwise the program uses some defaults which will cause an error. You should therefore provide the username and password of the workspaceAccount from the target AIS server daemon configuration. Note that even if you don't specify a u/p and get an error about incorrect user or password - you still have an excellent indication that the AIS client correctly connected to the server and tried to validate the u/p.

    Problems in this step should prompt examination of the .odbc.ini file ($ODBCINI).
  6. You can turn on DataStage odbc tracing (DataDirect actually) by specifying in the [ODBC] section of the $ODBCINI file the following:

    [ODBC]
    ...
    Trace=1
    TraceFile=odbctrace.out