Hi, thanks for the script!!
I have to keep any database off-line so the script gave me an error
so i put an additional condition in 2 where clauses relatives to sysdatabase table to avoid the problem:
'version is not null'
maybe is not the smartest way but it works...:Whistling:
bye