Isaac 8/9/2011 7:24:59 AM

Setting the Recovery Model of a database to Simple

We run a web hosting company and we use SQL Server, it happens that we put up several new SQL databases a month. Invariably, the developer will forget to put the new database in 'Simple' recovery model. If you leave a database in 'Full' mode and only run regular backups, the transaction logs won't truncate and the drive will fill up. .

That's what happened today (sigh), so I developed this script to fix it. The script will show the recovery model of all the dbs, and and set them to Simple (or Full) if desired

 

 

 

Version: Unknown or N/A
Section: SQL Scripts


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3