Prepare the runtime environment - connecting to the database

  1. In order to connect to IBM® Netezza®, you must have the "dbmntz" driver in $FGLDIR/dbdrivers.
  2. The IBM Netezza client software with ODBC driver is required to connect to a server.
    Check if the ODBC client library (libnzodbc.*) is installed on the machine where the BDL programs run.
  3. Make sure that the IBM Netezza client environment variables are properly set.
    Check for example NZ_DIR (the path to the installation directory), NZ_ODBC_INI_PATH (the path to the ODBC data source file), etc. See IBM Netezza documentation for more details.
  4. Verify the environment variable defining the search path for Netezza database client shared libraries (libnzodbc.so on UNIX™, ODBC32.DLL on Windows™).
    Table 1. Shared library environment setting for IBM Netezza
    IBM Netezza version Shared library environment setting
    IBM Netezza 7.2 and higher

    UNIX: Add $NZ_DIR/lib (for 32 bit) or $NZ_DIR/lib64 (for 64 bit) to LD_LIBRARY_PATH (or its equivalent).

    Windows: Add %NZ_DIR%\bin to PATH.

  5. Check the database client locale settings.

    With IBM Netezza, there is no configuration setting to defined database client: When using CHAR/VARCHAR columns, the application character set (LC_ALL, LANG) must be Latin-9 / ISO-8859-15. When using NCHAR/NVARCHAR columns, the application character set must be UTF-8.

  6. You can test the client environment by trying to connect to the server with the SQL command line tool:
    $ nzsql -h hostname system username password 
  7. Set up the FGLPROFILE entries for database connections.
    1. Define the Netezza database driver:
      dbi.database.dbname.driver = "dbmntz"
    2. The "source" parameter defines the name of the ODBC source.
      dbi.database.dbname.source = "test1"