Submit a ticketCall us
Home > Success Center > Network Performance Monitor (NPM) > Database Manager: The transaction log for database NPM is full

Database Manager: The transaction log for database NPM is full

Created by Malik Haider, last modified by Verwin Ubana on Apr 17, 2018

Views: 1,023 Votes: 6 Revisions: 17

Overview

 

This article provides brief information and steps to resolve the following Database Manager error:

The transaction log for database 'NPM' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

Environment

All NPM versions

Cause

The error is caused by either of the following:

  • No disk space
  • Log Data File (LDF) Autogrowth restriction has been reached.

Resolution

Change the recovery from Full to Simple.

Database recovery model - Change recovery model to Simple.

Recovery Models (SQL Server)

 

Transaction Log Size

The transaction log should be sized based on the amount of data modifications made to a database and the frequency of the log backups.  Large data modifications, such as data loads or index rebuilds should be taken into account when calculating a log file size.

In simple recovery model the transaction log should not grow as the interval between checkpoints (which truncate the log) is based on the amount of data modifications made. 
If the log does grow, it may be that there are long-running transactions or transactions that have been left open. Either may indicate a problem with the application.

In full or bulk-logged recovery model, if the transaction log grows it may indicate that the frequency of data modifications has increased and as such, 
the interval between log backups should be decreased. It may also indicate long running transactions or that the log backup jobs are not running properly.

 

Recover LDF:

  1. Set recovery to Simple.
  2. Create a backup of your database. This will mark the data in the transaction logs as committed and no longer necessary.
  3. Shrink the database to reclaim the log space. See also How to: Shrink a File (SQL Server Management Studio) for additional information.
    Note: You must have free space on the disk on order to run a shrink. 
  4. If above does not work, detach the database.
    Note: Do not proceed if there is an error when detaching.
  5. Stop Orion Services.
  6. In the SQL Mgt Studio or Orion Database Manger, right click on the NetPerfMon database and select Detach.
  7. Navigate to the directory where the MDF and the LDF files are stored, and delete ONLY the LDF file.
  8. Go back to Database Manager, right click on your SQL server, and select Attach Database.
    at.JPG
  9. Select the MDF file, and click Ok.
    mdf.JPG
  10. Remove the LDF file entry and click Ok.
    detach.JPG

     

To avoid further space issues, you restrict the growth to for example, 10MB.
log.JPG

 

 

Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.

 

Last modified

Tags

Classifications

Public