INF: Creating a Log Device If "Log Full" Error Occurs

Last reviewed: April 25, 1997
Article ID: Q60058

The information in this article applies to:

  - Microsoft SQL Server version 4.2 for OS/2

SUMMARY

When a "log full" error occurs consistently (even after modifying the recovery interval), it means that the log must be extended. This article describes the process.

MORE INFORMATION

When a log file is full, the correct procedure to use is to issue the ALTER DATABASE command, followed by the SP_LOGDEVICE command, so that you can physically move the log file to a device separate from the device on which the database resides. The device to which the log file will be moved must first be created by using the DISK INIT command before the log file can be moved to it.

The correct order in which to issue these commands is as follows:

  1. Issue a DISK INIT command. For example

          disk init,
          name = "testlog",
          physname = "c:\sqltest\log",
          vdevno = 2,
          size = 5120
    

    where:

          name =     The logical name of the log device.
    
          physname = The full pathname where the log file will reside.
    
          vdevno =   The virtual device number. This number must be unique,
                     where valid numbers are 1-9. An available number can
                     be determined by issuing the sp_helpdevice command.
    
          size =     The size of the database device in 2K blocks.
    
    

  2. Issue an ALTER command. For example

          alter database test on testlog = 2
    

    where:

          test =     The name of the database whose storage size is to be
                     changed.
    
          testlog =  The logical name of the device on which to put the
                     database extension on.
    
          2 =        The size of the space, in megabytes, allocated to the
                     database extension device.
    
    

  3. Issue a SP_LOGDEVICE command. For example

          sp_logdevice test, testlog
    

    where

          test =      The name of the database whose Syslogs table you
                      want to put on a specific device.
    
          testlog =   The logical name of the database device on which you
                      want to put the Syslogs table.
    


Additional query words: optimization tuning dumping loading
Keywords : kbother SSrvServer
Version : 4.2
Platform : OS/2
Issue type : kberrmsg


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.