This section describes you about downloading, configuring and testing Netezza Linux ODBC driver. This process is tested on the Ubuntu 14.04. Netezza Linux ODBC Drivers are requires to connect to Netezza server from any client machine.
Read:
- Install vmware player and Netezza emulator on Ubuntu
- Connecting Netezza using Python pyodbc – Working ExampleNetezza FPGA
- nzsql Command and its Usage
- nzload command and its Usage
Download Netezza Linux ODBC Driver
You can download Netezza Linux ODBC Driver from Netezza fix central page. Below is url for your reference:
https://www-945.ibm.com/support/fixcentral/
Note that, IBM service agreement in order to download Netezza software’s.
Provide all details as shown below:
In the next window, you will get lots of fix pack that IBM has released. We are interested in fix pack fp108869, search for it.
Under this fix pack download nz-linuxclient software and copy it to client machine where you want to configure Netezza Linux ODBC Driver.
Configure Netezza Linux ODBC Driver
The client software that downloaded will be gz format. Use tar command with xvf option to extract the files.
vithal@vithal-Inspiron-3558:~$ cd ~/Downloads/nzDriver vithal@vithal-Inspiron-3558:~/Downloads/nzDriver$ tar xvf nz-linuxclient-v7.2.1.2-P1.tar.gz datadirect.package.tar.z linux/ linux/npsclient.7.2.1.2-P1.tar.gz linux/unpack linux64/ linux64/npsclient.7.2.1.2-P1.tar.gz linux64/unpack webadmin/ webadmin/npswebclient.7.2.1.2-P1.tar webadmin/unpack
In the Next step, go to linux folder and execute the unpack file to unpack files to desired location where you want to copy the Netezza Linux ODBC Driver.
vithal@vithal-Inspiron-3558:~/Downloads/nzDriver$ cd linux vithal@vithal-Inspiron-3558:~/Downloads/nzDriver/linux$ ls -ltr total 105012 -rwxr-xr-x 1 vithal vithal 14799 May 25 06:52 unpack -rw-r--r-- 1 vithal vithal 107514414 May 25 06:52 npsclient.7.2.1.2-P1.tar.gz vithal@vithal-Inspiron-3558:~/Downloads/nzDriver/linux$ sudo ./unpack [sudo] password for vithal: ------------------------------------------------------------------------------- IBM Netezza -- NPS Linux Client 7.2.1.2-P1 (C) Copyright IBM Corp. 2002, 2016 All Rights Reserved. ------------------------------------------------------------------------------- Validating package checksum ... ok Where should the NPS Linux Client be unpacked? [/usr/local/nz] Installing in an existing directory. Changing permissions to overwrite existing files... 0% 25% 50% 75% 100% ||||||||||||||||||||||||||||||||||||||||||||||||||| Unpacking complete. vithal@vithal-Inspiron-3558:~/Downloads/nzDriver/linux$
Test Netezza ODBC Driver
Once unpack is completed. The next step is test the ODBC connect. If everything is working fine then add the ODBC bin path to PATH variable.
Test Netezza ODBC Connection String
vithal@vithal-Inspiron-3558:/usr/local/nz/bin$ /usr/local/nz/bin/nzodbcsql -c "Driver={NetezzaSQL}; servername=192.XXX.X.XXX; port=5480; database=TRAINING; username=trainee; password=xxxxx;" NZODBCSQL - program to test Netezza ODBC driver NOT FOR PRODUCTION USE Type 'quit' or '\q' or CTRL-D or ENTER at the prompt to quit NOTE: Max 100 rows are displayed (for selects) Driver version : 'Release 7.2.1.2-P1 [Build 48187]' NPS version : '07.02.0001 Release 7.2.1.0 [Build 46322]' Database : 'TRAINING' nzodbc >
Login to Netezza Server using nzsql Utility
Use Netezza nzsql utility to connect to Netezza using ODBC driver:
vithal@vithal-Inspiron-3558:/usr/local/nz/bin$./nzsql -h 192.XXX.X.XXX -u trainee -pw xxxxx -d training Welcome to nzsql, the IBM Netezza SQL interactive terminal. Type: \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit TRAINING.ADMIN(TRAINEE)=> select count(*) from _v_table; COUNT ------- 0 (1 row) TRAINING.ADMIN(TRAINEE)=>