Configuring the ODBC driver (UNIX and Linux)

Configuring the ODBC driver includes configuring environment variables and setting up the .odbcinst.ini configuration file.

About this task

For an overview of the .odbcinst.ini file, see ODBC driver configuration file (UNIX and Linux).

If you previously installed the client software while logged in as the superuser, you can now log out and log back in using your own user ID and password. You can use your own user ID and password when you configure your ODBC driver and Netezza Performance Server system data sources. Configuring the ODBC driver and Netezza Performance Server system data sources while logged in as an ordinary user allows each user of the system to supply different configuration information to access different Netezza Performance Server system data sources.

Procedure

  1. Modify the environment variables to include the appropriate installation directories. The following commands are examples:
    For AIX® operating systems:
       export PATH=$PATH:/usr/local/nz/bin
       export LIBPATH=$LIBPATH:/usr/local/nz/lib
    For HP-UX operating systems:
       export PATH=$PATH:/usr/local/nz/bin
       export SHLIB_PATH=$SHLIB_PATH:/opt/datanz/nz/bin
    For Linux® and Solaris operating systems:
       export PATH=$PATH:/usr/local/nz/bin
       export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/nz/lib

    These commands change the environment for the current session only. After you verify that your environment modifications work correctly, edit your login script to set the environment variables when users log in.

  2. If necessary, create or modify the .odbcinst.ini configuration file.

    You normally place the .odbcinst.ini file in your home directory while logged in as an ordinary user. You might want to place the .odbcinst.ini file in a different location, and you might want to do the configuration as the superuser, rather than as an ordinary user. In this step, it is assumed that you are logged in as an ordinary user and are using your home directory for the .odbcinst.ini file. What you do in this step depends on whether the .odbcinst.ini file already exists in your home directory:

    • The configuration file exists.
      Use a text editor such as vi to examine the .odbcinst.ini configuration file. The file can already exist in your home directory for different reasons, including the following ones:
      • Your client system was previously configured for one or more ODBC drivers other than the Netezza Performance Server ODBC driver. If you still want to use those ODBC drivers, do not modify entries in the .odbcinst.ini file. In this case, add the entry in the odbcinst.ini.sample file to the end of the contents of the .odbcinst.ini file.
      • The Netezza Performance Server client software and a Netezza Performance Server ODBC driver were previously installed on your client system, and the Netezza Performance Server ODBC driver is configured. In this case, you might not need to add any entries to the .odbcinst.ini file. If your .odbcinst.ini file already contains an entry similar to that in the odbcinst.ini.sample file, no changes are required. If it does not, add the entry in the odbcinst.ini.sample file to the end of the contents of the .odbcinst.ini file.
    • The configuration file does not exist.

      If the .odbcinst.ini configuration file does not yet exist in your home directory, copy the entire odbcinst.ini.sample file into your home directory, and rename it .odbcinst.ini.

    You can usually use the entry from the odbcinst.ini.sample file without modifying your .odbcinst.ini file. To see whether you must change any configuration entries for your installation, consult your Netezza Performance Server system administrator.

What to do next

Configure the data source. See Configuring the ODBC data source (UNIX and Linux).