• I'd also suggest changing the:

    WHERE recovery_model_desc != 'simple'

    to:

    WHERE recovery_model_desc != N'simple' AND state_desc = N'ONLINE'

    You're just wasting time trying to change the db's recovery model if it isn't ONLINE.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.