1 Diagnostic Tools : ODBC Trace

ODBC Trace
ODBC tracing allows you to trace calls to ODBC drivers and create a log of the traces. Creating a trace log is particularly useful when you are troubleshooting an issue.
To create a trace log:
1
2
3
4
For a more thorough explanation of tracing, refer to the following DataDirect Knowledgebase document:
http://knowledgebase.datadirect.com/article.aspx?article=3049&p=4
Enabling Tracing
Select Windows iconthe Tracing tab of the ODBC Data Source Administrator. 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.
The default DLL, odbctrac.dll, performs tracing. If you want to use a custom DLL instead, type the path and name of the DLL in the Custom Trace DLL field or click Browse to select a DLL.
After making these changes on the Trace tab, click Apply for them to take effect.
Enable tracing by clicking Start Tracing Now on the Tracing tab of the ODBC Data Source Administrator. Click Stop Tracing Now 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.
UNIX iconOn UNIX and Linux, you can enable tracing either through the DataDirect ODBC Data Source Administrator for UNIX/Linux (the UNIX ODBC Administrator) or by modifying the [ODBC] section in the system information (odbc.ini) file, as discussed next.
UNIX ODBC Administrator
If you are using the Administrator, select the Enable Tracing check box on the Tracing 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.
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 Technologies ships a default shared object, odbctrac.so, to perform tracing. If you want to use a custom shared object instead, type the path and name of the shared object in the Trace Library field or click Browse to select a shared object.
After making changes on the Trace tab, click Apply for them to take effect.
System Information (odbc.ini) File
The [ODBC] section of the system information file includes three keywords related to tracing: Trace, TraceFile, and TraceDll. For example:
Trace=1
TraceFile=odbctrace.out
TraceDll=ODBCHOME/lib/odbctrac.so
In this example, tracing is enabled, trace information is logged in a file named odbctrace.out, and odbctrac.so performs the tracing.
You enable tracing by setting the value of Trace to 1. Set the value to 0 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.
To specify the path and name of the trace log file, enter it as the value for TraceFile. If no location is specified, the trace log resides in the working directory of the application you are using.
DataDirect Technologies ships a default shared object, odbctrac.so, to perform tracing. If you want to use a custom shared object instead, enter the path and name of the shared object as the value for TraceDll.