You are currently offline, waiting for your internet to reconnect

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

Extended support for SQL Server 2005 ends on April 12, 2016

If you are still running SQL Server 2005 after April 12, 2016, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

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 INF: Diagnostic Tips for the Microsoft SQL Server ODBC Driver
139655 INF: Tracing SQL Generated by MS SQL Server ODBC Driver
248704 Open Database Connectivity Performance Slow When Tracing Enabled
performance slow hang freeze log grow huge large full
Properties

Article ID: 268591 - Last Review: 02/22/2007 22:33:50 - Revision: 4.3

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

  • kbprb kbsqlprog KB268591
Feedback
dy>