Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 274551 - Last Review: July 1, 2004 - Revision: 2.2
How To Generate an ODBC Trace with ODBC Data Source Administrator
This article was previously published under Q274551
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.
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.
NOTES
- If tracing does not appear to be working (that is, no trace file is generated or an empty file is created), you can turn it on by editing the registry directly. To make sure tracing is turned on, locate both of the registry locations listed previously, set Trace to 1, and set TraceDll and TraceFile to appropriate values. This action forces tracing to be on for all applications, regardless of whether they are running under the system account or the current user account.
- Always specify a full path like "C:\Sql.log" (without the quotes) in the Log File Path option.
- The Apply button is activated when you change the Log File Path. Either click OK or click Apply so that the changes take effect.
- Do not forget to turn tracing off when you are done with the troubleshooting. If you keep tracing set to on, it degrades your application performance.
- If you are using Microsoft ActiveX Data Objects (ADO), you may not be able to get any ODBC tracing. This occurs because ADO is an OLEDB Consumer and it uses OLEDB instead of ODBC. You do have ODBC tracing with ADO, but only if you are using the Microsoft OLEDB Provider for ODBC Driver (MSDASQL) Provider.
For additional information about ODBC Tracing, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
166458Â
(http://kbalertz.com/Feedback.aspx?kbNumber=166458/EN-US/
)
'One-time Only' Tracing Option Does Not Stop Automatically
268591Â
(http://kbalertz.com/Feedback.aspx?kbNumber=268591/EN-US/
)
ODBC Tracing to SQL.LOG Can Slow SQL or Consume All Space
139655Â
(http://kbalertz.com/Feedback.aspx?kbNumber=139655/EN-US/
)
Tracing SQL Generated by MS SQL Server ODBC Driver
168879Â
(http://kbalertz.com/Feedback.aspx?kbNumber=168879/EN-US/
)
Driver Manager Trace Facility Logs User Names and Password
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
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate