Based on the current release driver release compatibility matrix, found here, if you want to support Netezza NPS v6.0, v6.1, and v7.2 with the same ODBC driver, you should pick the most recent patch of the 7.1 ODBC driver. Install the Netezza ODBC client. Create a System DSN pointing to the DB server. Be sure to use the 32-bit ODBC driver manager on the Windows server located in the following exe. For Windows 2000 and XP, double-click on Administrative Tools, and then double-click on Data Sources (ODBC). The ODBC Data Source Administrator window should appear. To create a data source for the current user only, click the User DSN tab. The Netezza ODBC Driver Setup window opens. To run the Netezza connector, specify the Data Source for the database connection properties and the Server name which is the host name or IP address of the Netezza system to which the ODBC driver connects.
Why can't .NET connect to my Netezza box via the installed {NetezzaSQL} driver? 64bit applications also cannot connect via this ODBC connection. Why would that be? I've built both user and system Netezza ODBC connections in Control Panel, and both work fine when I click 'Test Connection'? I see the value in the registry, but when I traverse the registry drivers, .NET does not see 'NetezzaSQL'. According to Netezza, they don't have a 64 bit ODBC driver. The driver they provide should work for 32 and 64 bit applications. Could this be a permissions issue perhaps with Windows 7?
Open in new tab to see Registry Settings for ODBC and zoom in:
Apparently, the driver name goes inside of the curly brackets. When I get a list of drivers programmatically, I don't see the driver. How do I add to this list in the Windows user interface? I do however, see the installed Netezza driver under the Control Panel > Administrative Tools > ODBC Drivers.
Here is some code that verifies what I am explaining:
Here is the connection error I get from Microsoft Access 2007 from the Windows 7 box when I use the user ODBC connection. The system one was not visible.
Error: 'ODBC--call failed. [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application (#0)'
Netezza Odbc Driver Windows 7
1 Answer
Microsoft never renamed their 'system32' folder, so system32 really has all of the 64 bit drivers. And SysWow64 folder has all of the 32 bit drivers. By default, a .NET project created in Visual Studio 2010 will have a 'Target Platform' of x86. I just changed it to x64 and my connection worked to get my 64 bit NetezzaSQL driver working for .NET.
Just realize that you can launch the ODBC (Data Sources) dialog under Control Panel > Administrative Tools by running the 'odbcad32.exe' file in either the C:Windowssystem32 folder (this is the 64 bit version of the dialog to build 64 bit drivers), or in the C:WindowsSysWow64 folder (this is the 32 bit/x86 version of the dialog to build 32 bit drivers). Yes, the folders are reversed because Microsoft is weird that way.
Furthermore, there are two different folders in the Registry that get built. Turns out that the list above (in my black screen shot) comes from the ComputerHKEY_LOCAL_MACHINESOFTWAREWow6432NodeODBC list because those are 32 bit drivers. The dll I installed, 'nzodbcsetup.exe', apparently installed as a 64 bit driver. I am not exactly sure how to install this as a 32 bit driver on 64 bit windows, so that's why I changed the 'Target Platform' in my .NET project from the default x86 to x64. There has to be a way to install it as a 32 bit driver as well because when I installed this on a 32 bit Windows XP box, the driver worked fine.
What's weird is that Netezza's OLE drivers are separated. They have a 32 bit and a 64 bit dll exe file (for version 6.0.3). 'nzoledbsetup.exe' (~82MB x86) and 'nzoledbsetup64.exe' (~102MB x64). But the ODBC just has one, which is apparently both. I tried manually building a 32 bit driver in the SysWOW6432Node (under run > regedit) and pointed to the Driver file and Setup file (in the system32 folder, but I got an error. Please comment is there a way in Windows to automatically install as 32 bit, not 64.
MacGyverMacGyverNot the answer you're looking for? Browse other questions tagged .netregistryodbc64-bitnetezza or ask your own question.
Troubleshooting
Problem
This technote will give an example of how to connect to a Netezza Database via ODBC from a Cognos BI Server running on Windows and AIX.
Symptom
Netezza Odbc Driver Windows 10
Testing the Netezza Data source connection in Compatible Query Mode fails.
Cause
Incorrectly configured ODBC client on the Cognos server.
Resolving The Problem
Windows:
1. Install the Netezza ODBC client.
2. Create a System DSN pointing to the DB server.
Be sure to use the 32-bit ODBC driver manager on the Windows server located in the following exe
C:WindowsSysWOW64odbcad32.exe
AIX:
1. With the DB driver installed, open your odbc.ini file and add the following:
1.a. - Under the section [ODBC Data Sources] make sure there is an entry for NZSQL=NetezzaSQL similar to that shown below:
[ODBC Data Sources]
NZSQL=NetezzaSQL
1.b. - In the odbc.ini file add in the DSN for the Database similar to the following (For Netezza 6). Make sure that the driver path is accurate and the file libnzsqlodbc3.so exists in the specified location.
[NETEZZA_GODW_C10]
Driver = /isvdb/netezza/6.0/lib/libnzsqlodbc3.so
Description = NetezzaSQL ODBC
Servername = servername
Port = 5480
Database = db_name
Username = uid
Password = pwd
ReadOnly = false
ShowSystemTables = false
LegacySQLTables = false
LoginTimeout = 0
QueryTimeout = 0
DateFormat = 1
NumericAsChar = false
SQLBitOneZero = false
StripCRLF = false
securityLevel = preferredUnSecured
caCertFile =
;loadMaxErrors = 1
;loadRoundFraction = 0
2. Edit your odbcinst.ini file. If it does not exist, take a copy of the file odbcinst.ini.sample located in the Netezza client install directory (eg. /isvdb/netezza/6.0/lib).
3. Place this fine in the same directory as your odbc.ini file giving it the name odbcinst.ini.
4. Edit the newly created odbcinst.ini file, change the below line
UnicodeTranslationOption = utf8
to
UnicodeTranslationOption = utf16
This is needed for interaction with other ODBC driver managers.
5. Now add in your environment variables to the picture
export LIBPATH=/isvdb/netezza/6.0/lib:$LIBPATH
export ODBCINI=/etc/ODBC/odbc.ini
export NZ_ODBC_INI_PATH=/etc/ODBC
export PATH=/isvdb/netezza/6.0/bin:$PATH (optional)
6. To test that the DSN is setup correctly navigate to your Netezza client insatll directory /bin folder and run the following command (using your DSN from the odbc.ini file).
nzodbcsql <DSN_name>
7. If successful you should see the following prompt:
nzodbc >
If this fails to connect, discus with your DBA to make sure that you setup the DSN correctly in the ODBC.ini file.
8. To test that this odbc data source will work with Cognos 10.1.1 navigate to the Cognos /bin folder and run the following command (with the correct parameters).
./iodbctest 'DSN=DSN_in_odbc.ini_file;UID=uid;PWD=pwd'
If successful you should see the following prompt
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0607.1008
Driver: Release 6.0 [Build 14541] ()
SQL>
Now this is ready to use with Cognos 10.1.1.
Internal Use Only
This technote was generated by Technote Kickstart 1.0.0.75 based on Cognos PMR 05098,499,000.
View the associated PMR's text via Wellspring at: http://eclient.lenexa.ibm.com:9082/DocFetcher/source/PMR/05098.499.000%20O12/06/21