We have a database that we restored to a server and have been read/writing to that database for quite some time. We are now trying to apply TDE to that database and it will not allow us because it says the database has some read only files. Looking at the files via SSMS, we see nothing strange, but when we query sys.database_files, we see the attribute "is_media_read_only" set to one. No other database in our system has that set, so we a fairly confident this is the culprit. I was able to "unset" on the log file by detaching the database and re-attaching without the log (which created a new log file with this attribute "unset"). I also tried to create a new file in the primary filegroup and transition the data to the new file (and then drop the old file), but that can't be done on a "root" file, since boot data is available there. Also, generic backup/restore does not work. I suspect this database was once part of an always on availability group and served as a secondary replica (where the backup was taken), but that was long ago and no going back.
Any ideas on how to unset this so we can apply TDE?