A database can be set in one of three recovery modes: Full Recovery, Simple Recovery, and Bulk-Logged Recovery. Each mode determines how the transaction log should behave, both in active use and during a transaction log backup
- In Full Recovery Model, All transactions are logged and available for restore and truncated at transaction backup.
- In Bulk_Logged Recovery Model, All transactions except bulk-load events are logged and available for restore and truncated at backup.
- In Simple Recovery Model, All transactions are minimally logged for recovery operations and not available for restore and truncated when checkpoint occur.
- T-SQL
- SSMS
Alter Database dbName Set recovery full; ( bulk_logged, or simple ) ////View log DBCC LOG(dbName)
Database -->Properties --> Options Tab --> Set Recovery Model
Changing Recovery Model
Recommendation for changing recovery model:
- Switch from Full Recovery to Bulk-Logged Recovery.
- Perform your bulk-logged operation.
- After the bulk-logged operation completes, immediately move back to Full Recovery mode.
- Perform a full database backup.
Tags: Bulk Logged Recovery Model, Bulk Operations, Checkpoint, Full Recovery Model, Simple Recovery Model