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

ID: Q60058


The information in this article applies to:


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        : 

Last Reviewed: March 9, 1999