SQL Server Simple Recovery Model
(SET RECOVERY SIMPLE)
The "Simple" recovery model does what it implies, it gives you a simple backup that can be used to replace your entire database in the event of a failure or if you have the need to restore your database to another server. With this recovery model you have the ability to do complete backups (an entire copy) or differential backups (any changes since the last complete backup). With this recovery model you are exposed to any failures since the last backup completed.
The "Simple" recovery model is the most basic recovery model for SQL Server. Every transaction is still written to the transaction log, but once the transaction is complete and the data has been written to the data file the space that was used in the transaction log file is now re-usable by new transactions. Since this space is reused there is not the ability to do a point in time recovery, therefore the most recent restore point will either be the complete backup or the latest differential backup that was completed. Also, since the space in the transaction log can be reused, the transaction log will not grow forever as was mentioned in the "Full" recovery model.
Here are some reasons why you may choose this recovery model:
- Your data is not critical and can easily be recreated
- The database is only used for test or development
- Data is static and does not change
- Losing any or all transactions since the last backup is not a problem
- Data is derived and can easily be recreated
Type of backups you can run when the data is in the "Simple" recovery model:
- Complete backups
- Differential backups
- File and/or Filegroup backups
- Partial backups
- Copy-Only backups
How to set the simple recovery model using T-SQL.
|ALTER DATABASE dbName SET RECOVERY recoveryOption|
Example: change AdventureWorks database to "Simple" recovery model
|ALTER DATABASE AdventureWorks SET RECOVERY SIMPLE|
How to set using SQL Server Management Studio
- Right click on database name and select Properties
- Go to the Options page
- Under Recovery model select "Simple"
- Click "OK" to save