There was a problem loading the comments.

SQL Tips - SQL Log File

Support Portal  »  Knowledgebase  »  Viewing Article

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

View products that this article applies to.
Article ID : 268591
Last Review : February 22, 2007
Revision : 4.1
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:
a. 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.
b. 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.

Share via

Related Articles

© POSitive Software Company