Microsoft Knowledge Base Email Alertz

Open Database Connectivity (ODBC) Tracing can be used to trace calls to ODBC functions from ODBC applications. The ODBC Driver Manager can trace calls continuously or for one connection only, can perform tracing dynamically, or can allow tracing...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 268591 - Last Review: February 22, 2007 - Revision: 4.3

The Sql.log file may consume all disk space and cause SQL Server to run slowly when you turn on ODBC Tracing

This article was previously published under Q268591

SYMPTOMS

Open Database Connectivity (ODBC) Tracing can be used to trace calls to ODBC functions from ODBC applications. The ODBC Driver Manager can trace calls continuously or for one connection only, can perform tracing dynamically, or can allow tracing to be performed by a custom trace .dll file. ODBC Tracing stores information in a file on the local hard drive. By default, the file name is "SQL.LOG" and its physical location is the root of the system partition (that is, where the %windows% directory resides. For example C:\sql.log). The file location and name can be edited in the ODBC Data Source Administrator.

The user needs to be aware that having ODBC Tracing turned on can result in two problems:
  • The SQL.LOG file can grow very large and consume all existing disk space on the drive where it resides.
  • There may be a high input/output (I/O) overhead associated with ODBC Trace, and that can seriously impact the performance of the ODBC application or any application running on the computer where the trace is done.

WORKAROUND

To turn off ODBC Tracing and remove the associated file, follow these steps:
  1. To disable ODBC Tracing:
    1. For Microsoft Windows NT 4.0:
      • On the Start menu, click on Control Panel, and then click on Data Sources(ODBC).
      • Click on the Tracing tab, and choose Stop Tracing Now.
    2. For Microsoft Windows 2000:
      • On the Start menu, click on Control Panel, click on Administrative Tools, and then click on Data Sources (ODBC).
      • Click on the Tracing tab, and choose Stop Tracing Now.
  2. Stop all ODBC applications, and stop SQL Server. In some cases it may be necessary to reboot the server to free up the file so that it can be deleted.
  3. Delete the ODBC Tracing file, usually called "C:\SQL.LOG."
  4. Restart SQL Server.

MORE INFORMATION

For additional information on ODBC Tracing and SQL Server, click the article numbers below to view the articles in the Microsoft Knowledge Base:
140895  (http://kbalertz.com/Feedback.aspx?kbNumber=140895/EN-US/ ) INF: Diagnostic Tips for the Microsoft SQL Server ODBC Driver
139655  (http://kbalertz.com/Feedback.aspx?kbNumber=139655/EN-US/ ) INF: Tracing SQL Generated by MS SQL Server ODBC Driver
248704  (http://kbalertz.com/Feedback.aspx?kbNumber=248704/EN-US/ ) Open Database Connectivity Performance Slow When Tracing Enabled

APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 6.5 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Workgroup Edition
Keywords: 
kbprb kbsqlprog KB268591
       

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