Recovery Model options for MachPanel_Db


Summary

This article provides information how to handle the error due to recovery model of Database.

Applies To

MachPanel v6 and later.

ERROR Message

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

Error Message 2: Customers and Staff users cannot log into panel:

"Secret Key request failed Error occurred in sending secret key email, please try again later"

Recovery Model:

A recovery model is a database configuration option that determines the type of backup that one could perform, and provides the ability to restore the data or recover it from a failure.

If the recovery Model is set to Simple then this growth is abnormal , but if the Recovery Model is set to FULL (normally used for point-in-time restore AND/OR HA deployments) then such growth is expected and normal, but needs to be controlled with additional steps.

If it’s set to FULL then this growth can be tackled by backing-up log (LDF) files on a regular intervals. log backups make the space available for SQL Server to reuse for further logging.

Different Models are discussed here

In a nut shell , if Model is set to Full / log files must be backed-up regularly.

Resolutions :

  1. If Database Model set to “SIMPLE” then shrink Transaction log file and regularly monitor the log file as in this model it should not grow that much.
  2. If the Database Model is set to “FULL” — firstly move it to simple mode then perform a shrink on that database and move back to Full. To avoid issues in future perform the below steps.
  • Perform a full and transaction log backups separately.
  • Create SQL maintenance plan (steps can be googled.) to automate the whole process.
    • Add daily database backup along with maintenance clean up option
    • Add daily log backup, set recursive frequency to 4 or 8 hours along with maintenance clean-up option to save disk space.