Microsoft KB Archive/67969

= INFO: Storage of SQL Server's Error Log on Stand-Alone Server =

Article ID: 67969

Article Last Modified on 2/14/2005

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition

-



This article was previously published under Q67969



SUMMARY
The following information discusses the behavior of the error log when SQL Server is run as a stand-alone server.



MORE INFORMATION
If SQL Server does not find the old error log when it is started, it will create a new one. If it does find the old error log, it will reopen the error log and append to it. It is important to watch the size of this error log, because it can continually grow to be quite large if it is never deleted or renamed.

In addition, it is possible that the error log will not be placed in the \SQL\LOG directory. When SQL Server is started with &quot;sqlservr&quot;, the &quot;/e&quot; option is used to tell it where to place the error log. If this option is omitted, SQL Server will put the error log in the default directory when &quot;sqlservr&quot; was started.

One way to keep old copies of the error logs is to write a .CMD file that will perform this type of functionality. For example:

  echo off cd\ if exist errorlog.6 del errorlog.6 if exist errorlog.5 ren errorlog.5 errorlog.6 if exist errorlog.4 ren errorlog.4 errorlog.5 if exist errorlog.3 ren errorlog.3 errorlog.4 if exist errorlog.2 ren errorlog.2 errorlog.3 if exist errorlog 1 ren errorlog.1 errorlog.2 sqlservr /d  /e

NOTE: Instead of using the &quot;/d&quot; and &quot;/e&quot; options, it is also acceptable to use the &quot;-d&quot; and &quot;-e&quot; options. For example:

sqlservr -d  -e

Additional query words: novell Windows NT

Keywords: kbinfo kbother KB67969

-

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

© Microsoft Corporation. All rights reserved.