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 6 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. The database client locale must match the locale used by the runtime system (LC_ALL, LANG).
  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"