Thursday 30 March 2017

Configure a Netezza connection using ODBC on UNIX


  1. Install the Netezza ODBC driver, and Netezza client libraries.
    Note
    If you are running a PowerCenter 32-bit Integration Service, make sure the Netezza 32-bit ODBC driver and client are installed and accessible.
    If you are running a PowerCenter 64-bit Integration Service, make sure the Netezza 64-bit ODBC driver and client are installed and accessible.
  2. Set the following environment variables:
    • NZ_ODBC_INI_PATH
      Set NZ_ODBC_INI_PATH to $INFA_HOME/ODBCn.n/
    • Add $INFA_HOME/ODBCn.n/lib:{NetezzaInstallationDir}/lib64 to the shared library environment variable.
      • Solaris
        LD_LIBRARY_PATH
      • Linux
        LD_LIBRARY_PATH
      • AIX
        LIBPATH
      • HP-UX
        SHLIB_PATH
      For instance, use the following syntax for Solaris:
      LD_LIBRARY_PATH
      Add $INFA_HOME/ODBCn.n/lib:{your Netezza path}/lib64 to the library path
    • ODBCINI
      Set ODBCINI to ${NZ_ODBC_INI_PATH}/odbc.ini
      Set the ODBCINI environment variable so that it points to the location of the odbc.ini file.
      Note
      If this variable is not set it will look for .odbc.ini in the user's home directory.
    • PATH
      Using a Bourne shell:
      PATH="${PATH}:$ODBCHOME/bin
      Using a C shell:
      $ setenv PATH ${PATH}:$ODBCHOME/bin:
  3. Copy the Netezza ODBC sections from the odbc.ini.sample and odbcinst.ini.sample to their respective files used by PowerCenter which can both be found under $INFA_HOME/ODBCn.n.
    Example
    A typical entry in the odbc.ini is as follows:
    [NZSQL]
    Driver=/home/sganesh1/nz/nz/lib/libnzodbc.so
    Description=Netezza
    Servername=putah
    Port=5480
    Database=nzwide
    Username=username
    Password=password
    Debuglogging=true
    StripCRLF=false
    PreFetch=256
    Protocol=7.0
    ReadOnly=false
    ShowSystemTables=false
    Socket=16384
    DateFormat=1
    TranslationDLL =
    TranslationName =
    TranslationOption =
    NumericAsChar=false
  4. Copy the Netezza ODBC section from the odbcinst.ini.sample to odbcinst.ini file used by PowerCenter under $INFA_HOME/ODBCn.n.
    Example
    A typical entry in the odbc.ini is as follows:
    [NetezzaSQL]
    Driver                     = /usr/local/nz/lib/libnzodbc.so or libnzsqlodbc3.so
    Setup                      = /usr/local/nz/lib/libnzodbc.so or libnzsqlodbc3.so
    APILevel                   = 1
    ConnectFunctions           = YYN
    Description                = Netezza ODBC driver
    DriverODBCVer              = 03.51
    DebugLogging               = false
    LogPath                    = /tmp
    UnicodeTranslationOption   = utf8
    CharacterTranslationOption = all or latin9
    PreFetch                   = 256
    Socket                     = 16384
  5. Ensure that if you are using 64-bit PowerCenter that the Driver=/..../libnzodbc.so file is pointing to Netezza's lib64 directory in both odbc.ini and odbcinst.ini
  6. Test using ssgodbc utility found in $INFA_HOME/tools/debugtools/ssgodbc (on version 9.5.0 and higher).
    Otherwise, this can be downloaded from MySupport from the Debugging Tools Section in the lower left of the home page.


​Env Variable​





Testing the connection:



--
Regards
Sandeep C

No comments:

Post a Comment