• Use master

    declare @DBName varchar(35),

    @STR varchar (255)

    declare DBRecoveryModelGenerator_cursor cursor for

    select name from sysdatabases

    where category in ('0', '1','16')

    order by name

    open DBRecoveryModelGenerator_cursor

    fetch next from DBRecoveryModelGenerator_cursor into @DBName while (@@fetch_status <> -1)

    begin

    if (@@fetch_status <> -2)

    begin

    select @STR = 'SELECT DATABASEPROPERTYEX ('''+ @DBName + ''', ''Recovery'')' + @DBName

    exec (@str)

    end fetch next from DBRecoveryModelGenerator_cursor into @DBName end

    close DBRecoveryModelGenerator_cursor

    DEALLOCATE DBRecoveryModelGenerator_cursor

    go

    SQL DBA.