mstjn Commented 2 Years ago through
Blogs
If you're running >= sql2005 you might want to use sys.databases instead... Also there are some dbs that will cause your script to fail so you'd want to eliminate them. Offline dbs will cause an error. Maybe you don't want to back up a read-only db eith...