• Hi,

    Are the missing databases online? I have included a filter to only pick active databases.

    If the above does not solve your issue, please check if the name returned for the databases in sys.sysfiles is the same to the one in sys.databases as the link is created between these two objects on name.

    Regards.