1

I have recently installed IBM's Netezza Linux ODBC driver onto my web server. We have it all set up and are running queries through isql with the hopes to integrate it to a php website.

The issue we are having has to do with the return set. I only get the first field of the first result row. This occurs even though the output of the sql command returns the correct number of rows. I have tried running the sql through the command line as well as outputting the results to a file but it made no difference.

Example

-bash-3.2$ isql NZSQL -m10 -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select objid, tablename, owner from _v_table limit 10
+-----------+-----------+-----------+
| objid     | tablename | owner     |
+-----------+-----------+-----------+
| 19198083  |
|
|
|
|
|    
|
|
|
|
+-----------+-----------+-----------+
SQLRowCount returns 10
10 rows fetched

Here are my versions

unixODBC

-bash-3.2$ isql --help
unixODBC 2.2.11

OS

-bash-3.2$ uname -rvpo
2.6.18-274.7.1.el5 #1 SMP Mon Oct 17 11:57:14 EDT 2011 x86_64 GNU/Linux

any ideas would be greatly appreciated.

13
  • Is there any reason why you use isql instead of Netezza's native nzsql client? Commented Jun 20, 2013 at 14:38
  • I am familiar with the NZSQL client on the Netezza appliance, but I am not sure if the unix/linux installation .tar came with the client. The installation of unix/linux odbc onto our web servers was managed by our linux team but I do not remember seeing the client when I navigated through the downloaded files.
    – powpow12
    Commented Jun 20, 2013 at 14:54
  • Check your $NZ_HOME/bin directory, nzsql should be there. $NZ_HOME should be something like /usr/local/nz. Commented Jun 20, 2013 at 15:40
  • I recommend turning on ODBC logging (add Trace = yes and TraceFile = /tmp/odbc.log to your odbcinst.ini file). I bet there's an error.
    – Benny Hill
    Commented Jun 20, 2013 at 16:39
  • @BennyHill netezza odbc comes with DebugLogging and LogPath when I populated these values no log file was created. I then edited the file and changed them to what you suggested but no change occured.
    – powpow12
    Commented Jun 20, 2013 at 18:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.