• Sometimes you need to change all db's from full to simple in a second environment, where log room is scarce or you are just testing.

    Select 'Alter Database ['+name+'] Set Recovery simple with no_wait'

    from sys.databases

    where recovery_model_desc like 'full' and database_id > 4

    Will generate sql's to alter your user db's ( > 4) to simple, but won't run them. You can pick and execute them with cut and paste.

    -007sql