• you don't seem to be making any account for mounted volumes in your script, you must try to move away from legacy system catalogs and look at the new catalogs and DMVs that are available.

    At least the script doesn't actually try and shrink the databases 😉

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉