2010-08-18

Set Recovery Model Simple

On a test installation with quite a few databases we decided to alter the Recovery Model to Simple.
This statement generated the ALTER statements.
SELECT N'ALTER DATABASE [' + [name] + '] SET RECOVERY SIMPLE WITH NO_WAIT;' AS N'DDL'
FROM [master].[sys].[databases]
WHERE [recovery_model] <> 3 AND [name] <> N'model';

The output is copied to the (same) query window in SQL Server Management Studio and executed.
The total time of delivery is measured in seconds :-)

No comments: