Microsoft KB Archive/274551

= How To Generate an ODBC Trace with ODBC Data Source Administrator =

Article ID: 274551

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Data Access Components 1.5
 * Microsoft Data Access Components 2.0
 * Microsoft Data Access Components 2.1
 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.7

-



This article was previously published under Q274551



SUMMARY
The ODBC Driver Manager has a trace facility that allows the sequence of function calls made by an ODBC application to be recorded into a log file. Tracing is performed by a trace DLL, which captures calls between the application and the Driver Manager, and between the Driver Manager and the driver. This article describes how to start and stop ODBC tracing.



MORE INFORMATION
 Steps to Generate an ODBC Trace for ODBC Applications That Are Running Under the System Account

 Open the ODBC Data Source Administrator tool.  On a Microsoft Windows NT 4.0 computer, this is available in Control Panel as the Data Sources (ODBC) icon. On a Microsoft Windows 2000 computer, this is available as the Data Sources (ODBC) icon in Control Panel under Administrative Tools.  Click the System DSN tab, and then click Tracing. Click Start Tracing Now to enable tracing. Now, this button will read Stop Tracing Now.</li> You can specify the name of the log file in the Log File Path text box along with the full path (for example, C:\Odbclogs\Odbclog1.log).</li> Click OK.</li></ol>

This information is recorded in the following registry key:

HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.ini\ODBC

The following table shows the entries under this key, which control the tracing process:

</li> Steps to Generate an ODBC Trace for ODBC Applications That Are Running Under the Current User Account

<ol style="list-style-type: lower-alpha;"> Open the ODBC Data Source Administrator tool.</li> Click either the User DSN tab or File DSN tab, and then click Tracing.</li> Click Start Tracing Now to enable tracing. Now, this button reads Stop Tracing Now.</li> You can specify the name of the log file in the Log File Path text box along with the full path.</li> Click OK.</li></ol>

This information is recorded in the following registry key:

HKEY_CURRENT_USER\Software\ODBC\ODBC.ini\ODBC

The following table shows the entries under this key, which control the tracing process:

</li></ul>

To stop tracing, follow either of the previous procedures, depending on the type of application, except this time you must click Stop Tracing Now, which would then read Start Tracing Now.