skip to main content
Troubleshooting : Diagnostic tools : ODBC trace : Enabling Tracing : System information (odbc.ini) file
  

Try DataDirect Drivers Now
System information (odbc.ini) file
This information pertains to UNIX and Linux. The [ODBC] section of the system information file includes several keywords that control tracing:
Trace=[0 | 1]
TraceFile=trace_filename
TraceDll=ODBCHOME/lib/xxtrcyy.zz
ODBCTraceMaxFileSize=file_size
ODBCTraceMaxNumFiles=file_number
TraceOptions=0
where:
Trace=[0 | 1]
Allows you to enable tracing by setting the value of Trace to 1. Disable tracing by setting the value to 0 (the default). Tracing continues until you disable it. Be sure to turn off tracing when you are finished reproducing the issue because tracing decreases the performance of your ODBC application.
TraceFile=trace_filename
Specifies the path and name of the trace log file. If no path is specified, the trace log resides in the working directory of the application you are using.
TraceDll=ODBCHOME/lib/xxtrcyy.zz
Specifies the library to use for tracing. The driver installation includes a DataDirect enhanced library to perform tracing, xxtrcyy.zz, where xx represents either iv (32-bit version) or dd (64-bit version), yy represents the driver level number, and zz represents either so or sl. For example, ivtrc28.so is the 32-bit version of the library. To use a custom shared library instead, enter the path and name of the library as the value for the TraceDll keyword.
The DataDirect enhanced tracing library allows you to control the size and number of log files with the ODBCTraceMaxFileSize and ODBCTraceMaxNumFiles keywords.
ODBCTraceMaxFileSize=file_size
The ODBCTraceMaxFileSize keyword specifies the file size limit (in KB) of the log file. Once this file size limit is reached, a new log file is created and logging continues in the new file until it reaches the file size limit, after which another log file is created, and so on. The default is 102400.
ODBCTraceMaxNumFiles=file_number
The ODBCTraceMaxNumFiles keyword specifies the maximum number of log files that can be created. The default is 10. Once the maximum number of log files is created, tracing reopens the first file in the sequence, deletes the content, and continues logging in that file until the file size limit is reached, after which it repeats the process with the next file in the sequence. Subsequent files are named by appending sequential numbers, starting at 1 and incrementing by 1, to the end of the original file name, for example, odbctrace1.out, odbctrace2.out, and so on.
TraceOptions=[0 | 1 | 2 | 3]
The ODBCTraceOptions keyword specifies whether to print the current timestamp, parent process ID, process ID, and thread ID for all ODBC functions to the output file. The default is 0.
*If set to 0, the driver uses standard ODBC tracing.
*If set to 1, the log file includes a timestamp on ENTRY and EXIT of each ODBC function.
*If set to 2, the log file prints a header on every line. By default, the header includes the parent process ID and process ID.
*If set to 3, both TraceOptions=1 and TraceOptions=2 are enabled. The header includes a timestamp as well as a parent process ID and process ID.
Example
In the following example of trace settings, tracing has been enabled, the name of the log file is odbctrace.out, the library for tracing is ivtrc28.so, the maximum size of the log file is 51200 KB, and the maximum number of log files is 8. Timestamp and other information is included in odbctrace.out.
Trace=1
TraceFile=ODBCHOME/lib/odbctrace.out
TraceDll=ODBCHOME/lib/ivtrc28.so
ODBCTraceMaxFileSize=51200
ODBCTraceMaxNumFiles=8
TraceOptions=3