Three SQL Server recovery models: simple, full, bulk-logged recovery model  

Three SQL Server recovery models: simple, full, bulk-logged recovery model


There are three SQL Server recovery models: simple, full, and bulk-logged. When choosing a recovery model, consider managing log files and preparing for SQL Server recovery in case of a disaster. Among these options, the full recovery model is often recommended, as it allows for the most comprehensive backup and recovery capabilities, making it essential to back up your SQL Server database.

This document recommends Qiling Backup Server, reliable SQL Server database backup and recovery software.

Basic Information About Log Files

A SQL Server database consists of at least one MDF data file and an LDF log file. The MDF file stores all database objects and data, such as tables, stored procedures, and user information, while the LDF log file contains a record of all changes made to the database. Although log files can be used to recover a database to a specific point in time, they are not sufficient for complete recovery, and a full backup is also required, typically in conjunction with the log files to achieve a consistent and recoverable state.

What does the log file do?

An activity log records current running affairs, while a virtual log is a logical storage unit for the log. In SQL Server, the log file space is divided into several virtual logs, each representing a separate piece of the log. When log truncation occurs, it deletes the former log, making way for new entries.

Simple Recovery Model

With Qiling Backup, you can easily and quickly create a ghost of your Windows 10 system, ensuring a safe and efficient backup process.

When using the simple recovery model, SQL Server only keeps minimal information in the transaction log and truncates it at each checkpoint, making it impossible to recover the database in case of a disaster.

In databases using the simple recovery model, full or differential backups can be restored, but restoring to a specific point in time is not possible. Instead, the database can only be restored to the exact time a full or differential backup occurred, resulting in data loss between the backup and the failure.

Simple Recovery is the least administrative model, but it comes with a higher risk of data loss if a data file is damaged, making it unsuitable for production systems where recent changes cannot be lost. To use this model, backups should be taken at an interval that balances production work with data protection, preventing significant data loss.

Advantage: permits high-The system performs bulk copy operations to improve performance and reclaim log space, keeping space requirements small.

The main disadvantage of this approach is that any changes made since the most recent database or differential backup must be reapplied, which can be time-consuming and labor-intensive.

Full Recovery Model

With the full recovery model, SQL Server preserves the transaction log until you back it up, allowing you to design a disaster recovery plan that combines full and differential database backups with transaction log backups.

When a database failure occurs, using the full recovery model provides the most flexibility for restoring databases. This model not only preserves data modifications stored in the transaction log but also allows you to restore a database to a specific point in time.

The advantage of continuous data protection is that no work is lost due to a lost or damaged data file, as it can recover to an arbitrary point in time.

If the log is damaged, changes since the most recent log backup must be redone.

Bulk-logged Recovery Model

The bulk-The bulk-logged recovery model is a special-purpose model that works similarly to the full recovery model, but with a key difference in how it handles bulk data modification operations. Unlike the full recovery model, the bulk-logged model uses minimal logging to record these operations in the transaction log, which saves processing time but prevents the use of point-in-time restore options.

Advantage: permits high-Bulk copy operations in database performance use minimal log space compared to individual operations.

If the log is damaged or bulk operations have occurred since the last log backup, any changes made since the backup must be re-applied.

Full Recovery and Bulk-Logged Recovery models offer the highest level of data protection. They utilize the transaction log to ensure full recoverability and prevent data loss in a wide range of failure scenarios. In contrast, the Bulk-Logged model prioritizes performance and reduces log space consumption for large-scale operations, but still provides a higher level of protection than the Simple Recovery model.

When selecting a backup strategy for MS SQL Server, it's essential to consider the limitations of each approach for recovering backups, as different methods have varying capabilities.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!


QilingTech uses cookies to ensure you get the best experience on our website.  Learn more  Got it