Configuring access to Netezza databases on Linux and UNIX

To configure access to Netezza database you must specify parameters in the .odbcinst.ini file to configure the Netezza ODBC driver and also modify the .odbc.ini file to configure the data sources.

Before you begin

About this task

If an .odbcinst.ini configuration file exists, you can modify the same file. If there is no existing .odbcinst.ini configuration file, then you can use the odbcinst.ini.sample to create the .odbcinst.ini configuration file. In most scenarios, you can use the contents of the odbcinst.ini.sample file without any changes. However, in the following scenarios, you must change the configuration file:
  • If your client system was configured for ODBC drivers other than the Netezza ODBC driver and you want to continue to use those ODBC drivers, do not modify the existing entries in the .odbcinst.ini file. Add an entry for the Netezza ODBC driver at the end of the existing contents of the .odbcinst.ini file.
  • If the Netezza client software and a Netezza ODBC driver were installed on your client system, check if the Netezza ODBC driver is configured. If it is not, add an entry to the end of the existing contents of the .odbcinst.ini file.

If the .odbc.ini configuration file exists in your home directory (For example, /home/myname) check if it contains entries for the Netezza appliance data sources to access. If it does not, copy the contents of the odbc.ini.sample file to the end of your existing .odbc.ini configuration file. Do not modify any existing entries in the file.

If you are using the InfoSphere® Information Server version of the .odbc.ini configuration file on Linux, create a symbolic link in the folder where the configuration file exists to make sure that the Netezza connector works correctly:
  1. Log on as the InfoSphere DataStage® administrator.
  2. To change to the installation directory of InfoSphere Information Server, enter the command: cd /opt/IBM/InformationServer/Server/DSEngine .
  3. To create a symbolic link, enter the command: ln -s .odbc.ini odbc.ini.

Procedure

  1. Log in using your user ID and password.
  2. Configure the Netezza ODBC driver.
    1. Copy the contents of the /usr/local/nz/lib/odbcinst.ini.sample file.
    2. Modify the configuration entries depending on your requirement. Consult your Netezza system administrator to check if you must modify any specific configuration entries for your installation.
    3. Save the file as .odbcinst.ini.
  3. Configure the Netezza appliance data sources.
    1. Copy the contents of odbc.ini.sample file into your home directory (For example, /home/myname) and rename it .odbc.ini.
    2. Optional: To add the Netezza data sources to an existing .odbc.ini file, add the lines after [NZSQL] from the sample file to the existing .odbc.ini file. In the [ODBC Data Sources] section, add NZSQL = NetezzaSQL to the list of data source names.
    3. Save and close the file.
  4. Set the following environment variables:
    export ODBCINI=path_to_odbc.ini_file
    export NZ_ODBC_INI_PATH=location_of_odbc.ini_file
    Note: If the Netezza entries were added to an existing odbc.ini file, set only the NZ_ODBC_INI_PATH variable.
  5. To restart the server engine and the ASB Agent, enter the following command.
    cd Install_directory/Server/DSEngine/bin
    ./uv -admin -stop
    ./uv -admin -start
    cd Install_directory/ASBNode/bin
    . ./NodeAgents_env_DS.sh
    ./NodeAgents.sh stopAgent
    ./NodeAgents.sh start