I have a situation where there is a file listed in my sys.database_files but the file is not on disk and also not in any filegroup. When I try to remove it I get the message:
Msg 5009, Level 16, State 9
One or more files listed in the statement could not be found or could not be initialized
How can I clean up my sys.database_files (and sys.master_files, by extension) table?