• Great script.

    But need to correct it.

    I have 20 databases on one server and 3 are offline for some special pruposes.

    This script gives me error and does not work if one of db's is offline.

    I think it must work and skip this kind of databases, because for example some of db's can be mirrored db and it is not possible to bring them online etc.

    Thank you.

    Regards,

    Oleg.