• Thank you for reply GAIL.

    you sugest this?:

    select * from master.sys.databases

    where [state_desc] <> 'online'

    Question:

    If a database is suspect what will be is state_desc?

    If a database is in read_only what will be is state_desc?

    thank you