Prepare the runtime environment - connecting to the database
- In order to connect to IBM®
Netezza®, you must have the
"
dbmntz
" driver in $FGLDIR/dbdrivers. - 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.
- 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.
- 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.
- 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) and the database character set defined byCREATE DATABASE
must match. When usingNCHAR/NVARCHAR
columns, the application character set must be UTF-8. - 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
-
Set up the FGLPROFILE entries for database
connections.
-
Define the Netezza database driver:
dbi.database.dbname.driver = "dbmntz"
-
The "
source
" parameter defines the name of the ODBC source.dbi.database.dbname.source = "test1"
-
Define the Netezza database driver: