When I try to remove 'MYFILEGROUP', I get the error that the filegroup cannot be removed because it is not empty. I already removed all tables, indexes and deleted all files associated with the group. To verify I ran the scripts below:
returns 0 for the filecount on 'MYFILEGROUP'.
select o.name, s.groupname from sysobjects o join sysindexes i on o.id = i.id join sysfilegroups s on i.groupid = s.groupid where groupname = 'MYFILEGROUP'
returns no rows ...
I have some more information. When I run
The result lists all of the primary keys with a warning stating:
Cannot process rowset ID 72057597605511168 of object "TableName" (ID 2071414), index "PK_TableName" (ID 1), because it resides on filegroup "PRIMARY" (ID 1), which was not checked.
Is this expected behavior or does it indicate a problem with the system tables? If it is a problem then how would I fix it? I removed every foriegn key, index and constraint from the database leaving only the tables. It still errors when I try to remove the empty "MYFILEGROUP".