Netezza Performance Server

Netezza Performance Server

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only

Cannot connect to Netezza DSN using 64-bit libnzodbc.so and DataDirect ODBC Driver.

  • 1.  Cannot connect to Netezza DSN using 64-bit libnzodbc.so and DataDirect ODBC Driver.

    Posted 2 days ago
    Edited by Kristen Park 2 days ago
    We are currently facing an issue that prevents us from being able to connect to a Netezza DSN on Red Hat 8 using the 64-bit libnzodbc.so shared library with DataDirect ODBC Driver Manager.  When I use a simple program to test the connection (which prompts for DSN, user name and password), I get:

    $ testodbc
    Enter the data source name : NZSQL
    Enter the user name        : xxx
    Enter the user password    :
    SQLConnectW returned error: -1
    SQLState: HY000
    TmpErrBuf: Server and/or port attributes are empty 

    The odbc.ini file entry for this DSN is (IP and credentials are x'ed out intenionally):
    [NZSQL]
    Driver                = /usr/local/nz/lib64/libnzodbc.so
    Description           = NetezzaSQL ODBC
    Server                = xx.xxx.xxx.xxx
    Port                  = 5480
    Database              = xxx
    Username              = xxxx
    Password              = xxxxxxx
    DriverConfigMethod=DSN
    ReadOnly              = false
    ShowSystemTables      = false
    LegacySQLTables       = false
    LoginTimeout          = 0
    QueryTimeout          = 0
    DateFormat            = 1
    NumericAsChar         = false
    SQLBitOneZero         = false
    StripCRLF             = false
    securityLevel         = preferredUnSecured
    caCertFile            =
    The odbcinst.ini file contains:
    [ODBC Drivers]
    NetezzaSQL=Installed
    [NetezzaSQL]
    Driver           = /usr/local/nz/lib64/libnzodbc.so
    Setup            = /usr/local/nz/lib64/libnzodbc.so
    APILevel         = 1
    ConnectFunctions = YYN
    Description      = Netezza ODBC driver
    DriverODBCVer    = 03.51
    UnicodeTranslationOption = utf8
    CharacterTranslationOption = all
    PreFetch         = 256
    Socket           = 16384
    I tried adding debug log entries to both odbc.ini and odbcinst.ini, as follows:
    DebugLogging     = 1
    LogPath          = /home/simonb/Optim/11800/ODBC
    With this added there was no log file generated.
    I also ran the test program as follows:
    $ LD_DEBUG=all testodbc 2>&1 | grep libnzodbc | tee /tmp/nz.out
    The output shows that /usr/local/nz/lib64/libnzodbc.so was dynamically loaded.
    The odbc related ini files also contain connection information for SQL Server and when I use the test program with that DSN, the connection succeeds.
    I also tried running nzodbcsql with the Netezza DSN and it produces the same error.
    $ /usr/local/nz/bin64//nzodbcsql NZSQL
    NZODBCSQL - program to test Netezza ODBC driver
        Usage : <exe> <DSN> [Max-rows]
                   1 - Data Source Name - mandatory
                   2 - Maximum rows to display - optional; default 100
          Type 'quit' or '\q' or CTRL-D or ENTER at the prompt to quit
          NOTE: Max 100 rows are displayed (for selects)
    *** SQLConnect: failed
    Server and/or port attributes are empty
    At this point since I am stuck.   I would appreciate any suggestions or insights to get me unblocked.



    ------------------------------
    Simon Bielasiak
    ------------------------------