OS
WindowsMicrosoft SQL Server
Software
AlleError message
"[Microsoft][ODBC SQL Server Driver][SQL Server]The statement BACKUP LOG is not allowed while the recovery model is SIMPLE"Cause
The SQL-backup is made up of 2 schedules: one task backups the database and the other backups the transaction logs.The transaction logs can only be backupped when the recovery model is set to Full.
Solution
Backups can be made using only database backups, with larger databases it might be more efficient to make regular log backups and fewer database backups.In case you do want to backup the log files using the following steps to change the model.
Option 1: Management Studio
- Start the SQL Server Management Studio
- Connect to the instance and log on
- Expand 'Databases'
- Expand 'System Databases'
- Right click on the database and select properties
- Go to the Options tab
- Choose the recovery model 'Full' from the drop down
- Connect to the instance and log on
- Execute a new query:
USE [DB name] ; ALTER DATABASE model SET RECOVERY FULL ;