2

One of our SQL databases recovery model keeps resetting from Simple to Full causing the log file to fill up.

The only thing we could think of was that IT had been restoring that database. Would this default the recovery setting to Full?

3 Answers 3

4

Restoring a database will set its recovery mode to the same as the source database was when it was backed up; there is no default, it is an attribute of the database stored in the backup and retained when it is restored. If you want simple mode, you'd have to change it after the restore is complete.

2

It is a simple change in the GUI or in SQL to do this, and there is no obvious mechanism to allow auditting.

If this is in development using a VS2008 or VS2010 database project, the default settings within the project will change the recovery model everytime you deploy to the database (even if there are no structural changes to apply).

The recovery model is set in the selected .sqlsettings file (the default one is found under Properties folder, and is selected in project properties). I've not found a setting to tell VS to not set recovery model (lots of options in .sqldepolyment file, but not this).

2

A database won't switch from simple recovery to full unless a command is issued to do this, or the database is restored - and the database backed up was in full recovery mode.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .