Sql-server – Is it ok to change from full recovery to simple recovery in Sql Server

sql serversql-server-2008

I have an old database – a users membership/role that was setup automatically by an ASP.Net 2 application years ago:

ss1

The Sql Server version currently running is: Sql Server 10.5.1617

The users database log file is huge (the ldf file is approx 400 times the size of the mdf file).

The recovery model is currently set to "Full". I understand what that is – and I don't need point in time restoration.

If I simply changed the recovery model to "Simple" from within Sql Server Management Studio:

ss2

…and clicked ok to save the changes – would I be risking my current database in any way? Or is Sql Server fine with making changes like this to live databases? And would the log file automatically shrink itself?

Thanks for your advice,

Mark

Best Answer

I would do this when the database is in low activity (end of day, overnight, first thing in the morning). I would NEVER recommend making changes like this to a live database in the middle of working hours. It's probably a good idea to change the database to read-only or make sure no users/applications are hitting it.

  • Run a full backup of the database/log file in question, while still in full recovery mode. This will give you a starting point in case anything gets borked and you can just restore it.

  • Switch to SIMPLE recovery, I don't like using the GUI, I'd script it out.

Here's a great article from MSDN about things to consider when changing your backup model: Considerations for Switching from the Full or Bulk-Logged Recovery Model.