IBM Support

Enabling ODBC/JDBC debug logging

Question & Answer


Question

How do I enable ODBC/JDBC debug logging?

Answer

Beginning with NPS 2.5, enable ODBC debug logging by doing the following:

ODBC Trace for Windows Platforms

Use the ODBC Data Source Administrator. This is typically found via Start / Settings / Control Panel / Adminisrative Tools / Data Sources (ODBC).

  • To enable Driver Manager tracing
    1. Select the Tracing tab.
    2. Define the Log File Path.
    3. Click Start Tracing Now.
  • To enable NPS ODBC logging
    1. Select the System DSN tab.
    2. Select the DSN.
    3. Click the Configure button.
    4. Click the Driver Options button.
    5. Check the Enable DebugLogging check box.
    6. Define the Log File Path.

The NPS ODBC log will be recorded in the path identified by Log File Path and the file will be named nzodbc_<pid>.log.

ODBC Trace for Unix/Linux platforms
  • Edit the .odbc.ini or (odbc.ini) and make the following changes. To enable Driver Manager logging:
     [ODBC]
       Trace = 1    
       TraceAutoStop = 0
       TraceFile = /tmp/sql.log

To enable NPS ODBC logging in the stanza entitled [NetezzaSQL]
  • Edit the .odbcinst.ini or (odbcinst.ini) and make the following changes:
      DebugLogging = true

As a result of the above, the ODBC Driver Manager trace will be recorded in the file identified by TraceFile. Additionally the NPS ODBC log will be recorded in the same path as TraceFile and the file will be named /tmp/nzodbc_<pid>.log.

To create a JDBC Trace:

Add loglevel=2 to your connection string. For example:
    "jdbc:netezza://192.168.23.226:5480/testdb;loglevel=2;logDirPath=c:\myjdbclogdir";

The trace file will be found at the location specified by the logDirPath argument above.

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ630015

Document Information

Modified date:
17 October 2019

UID

swg21573645