I got the following error when i try to remove the filegroups. I have remove all the files before running removing filegroups script, but still met the error.
Msg 5042, Level 16, State 12, Line 1
The filegroup '*****' cannot be removed because it is not empty.
The filegroup id is 4. And i run the script to check if the filegroup is using but nothing return.
SELECTgroupid,
name
FROM dbo.sysindexes
WHERE groupid=4
ORDER BY
groupid,
name