WinSQL » Knowledge base

Document information

Document ID: 813
Subject: Generating ODBC trace log
Creation date: 7/29/09 4:45 PM
Last modified on: 7/29/09 4:45 PM


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. The following section describes how to start and stop ODBC tracing.

Steps to Generate an ODBC Trace for ODBC Applications

  • Open the ODBC Data Source Administrator tool. This is available as the Data Sources (ODBC) icon in Control Panel under Administrative Tools.
  • Click the Tracing tab
  • Click Start Tracing Now to enable tracing. Now, this button will read Stop Tracing Now.
  • You can specify the name of the log file in the Log File Path text box along with the full path (for example, C:\sql.log).
  • Click OK


When ODBC tracing is on, any program that uses ODBC to connect to a database will run very slow. This is because every call to the database will incur additional CPU cycles for logging.

Add a comment to this document

Do you have a helpful tip related to this document that you'd like to share with other users?

Important: This area is reserved for useful tips. Therefore, do not post any questions here. Instead, use our public forums to post questions.


Social Media

Powered by