Tuesday, 27 October 2009

Change all DBs to FULL recover model

--Change all DBs to FULL recover model
--Last update by MsMiller 27-10-09


declare @dbname nvarchar(4000)
declare @comm nvarchar(4000)
set @dbname = 'select ''ALTER DATABASE ''+ name + '' SET RECOVERY FULL'' from sys.databases where recovery_model <> 1 and name NOT IN(''master'', ''tempdb'')'
exec (@dbname)