HOWTO: Enable ODBC trace to troubleshoot specific ODBC client connectivity issues on UNIX/LINUX

Configure ODBC Trace

When ODBC trace files are requested by Datometry support, follow these steps

  1. Remove any existing ODBC trace files
  2. Start ODBC tracing
  3. Restart the application
  4. Reproduce the issue
  5. Stop the application
  6. Stop ODBC tracing

Make sure to turn tracing off after the trace has been generated otherwise it will affect the performance.

Locating your odbc.ini config file

The default location of the odbc.ini file is in $HOME/.odbc.ini. Optionally, ODBCINI environment variable may point to the odbc.ini file present in non-default location.

For example, to use odbc.ini present in /usr/test/odbc.ini, set the ODBCINI as follows

export ODBCINI=/usr/test/odbc.ini

To start ODBC tracing 

In the odbc.ini file add the following settings to the [ODBC] section or add the full section if it is missing.  

The 'Trace' attribute enables the ODBC tracing.
The attribute 'TraceFile' specifies the directory and file name of the ODBC trace file.  

In the example below, tracing is enabled and file odbctrace.out will be written to the /some/directory/here/if/needed/ directory.

[ODBC]
Trace=1
TraceFile=/some/directory/here/if/needed/odbctrace.out
TraceDll=/Your/ODBC/install/directory/here/lib/ddtrc27.so

NOTE: The file name of the TraceDll will depend on whether the drivers are 32-bit or 64-bit.  For 32-bit, the prefix is "iv" and for 64-bit the prefix is "dd".  The number suffix of the file name will be related to the version of the driver software.  In this instance, "27" indicates Teradata driver version 15.X.  Please verify the specific version of the odbc trace library that you have distributed with your driver.

To stop ODBC tracing 

Set 'Trace' attribute to 0 (zero) 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.