Progress DataDirect provides a tracing library that is enhanced to operate more efficiently, especially in production environments, where log files can rapidly grow in size. The DataDirect tracing library allows you to control the size and number of log files.
On UNIX and Linux, you can enable tracing by directly modifying the [ODBC] section in the system information (odbc.ini) file. On Linux, you can also enable tracing through the Trace tab of the DataDirect ODBC Data Source Administrator for Linux.
the ODBC Data Source Administrator and the Tracing tab. To specify the path and name of the trace log file, type the path and name in the Log File Path field or click
Browse to select a log file. If no location is specified, the trace log resides in the working directory of the application you are using.
Click Select DLL in the Custom Trace DLL pane to select the DataDirect enhanced tracing library,
xxtrc
yy.dll, where
xx represents either iv (32-bit version) or dd (64-bit version), and
yy represents the driver level number, for example, ivtrc26.dll. The library is installed in the \Windows\System32 directory.
Enable tracing by clicking Start Tracing Now. Tracing continues until you disable it by clicking
Stop Tracing Now. Be sure to turn off tracing when you are finished reproducing the issue because tracing decreases the performance of your ODBC application.
■
|
Trace information log file (trace_filenameINFO.log). This file is created in the same directory as the trace log file and logs the following SQLGetInfo information:
|
The DataDirect enhanced tracing library allows you to control the size and number of log files. The file size limit of the log file (in KB) is specified by the Windows Registry key ODBCTraceMaxFileSize. Once the size limit is reached, a new log file is created and logging continues in the new file until it reaches its file size limit, after which another log file is created, and so on.
The maximum number of files that can be created is specified by the Registry key ODBCTraceMaxNumFiles. 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, SQL1.LOG, SQL2.LOG, and so on.
The default values of ODBCTraceMaxFileSize and ODBCTraceMaxNumFiles are 102400 KB and 10, respectively. To change these values, add or modify the keys in the following Windows Registry section:
On Linux, you can enable tracing either through the Trace tab of the DataDirect ODBC Data Source Administrator for Linux (the Linux ODBC Administrator) or by directly modifying the [ODBC] section in the system information (odbc.ini) file.
To specify the path and name of the trace log file, type the path and name in the Trace File field or click
Browse to select a log file. If no location is specified, the trace log resides in the working directory of the application you are using.
DataDirect ships an enhanced library to perform tracing. This library appears by default in the Trace Library field. If you want to use a custom library instead, type the path and name of the library in the Trace Library field or click
Browse to select a library.
To enable tracing, select the Enable Tracing check box on the Trace tab of the Administrator. Clear the check box to disable tracing. 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.
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, ivtrc26.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.
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 ODBCTraceMaxNumFiles 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.
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 ivtrc26.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.