Microsoft KB Archive/268591

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

Article ID: 268591

Article Last Modified on 2/22/2007

-

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

-



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 &quot;SQL.LOG&quot; 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:  To disable ODBC Tracing:  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.  For Microsoft Windows 2000:  On the Start menu, click on Control Panel, click on Administrative Tools, and then click on Data Sources (ODBC).</li> Click on the Tracing tab, and choose Stop Tracing Now.</li></ul> </li></ol> </li> 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.</li> Delete the ODBC Tracing file, usually called &quot;C:\SQL.LOG.&quot;</li> Restart SQL Server.</li></ol>

<div class="moreinformation_section">

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

Additional query words: performance slow hang freeze log grow huge large full

Keywords: kbprb kbsqlprog KB268591

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.