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

Last reviewed: April 25, 1997
Article ID: Q67969

The information in this article applies to:

  - Microsoft SQL Server version 4.2 for OS/2
  - Microsoft SQL Server versions 4.2, 4.21, 4.21a

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 "sqlservr", the "/e" 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 "sqlservr" 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\<path name where error logs will be kept>
   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 <path for master.dat> /e <path for error log>

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

   sqlservr -d <path for master.dat> -e <path for error log>


Additional query words: novell Windows NT
Keywords : kbother SSrvErr_Log SSrvGen SSrvWinNT
Version : 4.2 | 4.2 4.21 4.21a
Platform : OS/2 WINDOWS
Issue type : kbtshoot


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.