File entry not removed from sys.database_files after Alter Database Remove file (AlwaysOn)

  • HI Guys,

    We have used "alter database DBname remove file filename" to remove some extra files that we do not need from a database that is part of an alwayson group.

    But the corresponding file is not removed from sys.database_files and the State_desc is shown as OFFLINE.

    I tried running log backup but it didnt help.

    I have tested this scenario on a DB which is not part of alwayson and log backup clears the entry of the removed file, but i am not sure why it does not clear when the db is part of alwayson.

    Thanks,

    Jesi

  • Hi

    files your trying to remove from the database is part of your Alwayson Group ??

  • yes, its part of a DB which is part of availability group

  • when you try to remove the files , The file must be empty

  • I had similar issue however this has been resolved after the failover  operation. When you check the sys.database_files the drop_lsn column will be not null before the fail over. In my case the failover happened automatically

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply