December 6, 2006 at 7:03 am
The filegroup 'FG_W20060730' cannot be removed because it is not empty.
The file 'FL_W20060730' cannot be removed because it is not empty.
December 6, 2006 at 10:09 am
the sql below might help; it identifies objects and the filegroup they belong to;maybe something is not moved off of the filegroup yet?
select sysobjects.name as TableName,
s.groupname as Data_located_on_filegroup
from sysobjects, sysfilegroups s, sysindexes i
where
sysobjects.id = i.id
and i.indid < 2
and i.groupid = s.groupid
Lowell
December 6, 2006 at 10:43 am
Thanks Lowell for the reply.
When I ran your query it returned 0 rows.
But I modified it a little and it helped me:
select sysobjects.name as TableName,
s.groupname as Data_located_on_filegroup
from sysobjects, sysfilegroups s, sysindexes i
where
sysobjects.id = i.id
and i.groupid = s.groupid
After running this query I found that there were some non-clustered indexes that were created on this filegroup but the parent tables were there on some other filegroup.
Since these tables were also not required, I dropped them and after that the file and filegroup have been successfully removed from the Database.
Thanks for your help
RSingh
December 6, 2006 at 10:50 am
Don't forget to take full backup without any delay after major modifications to the db.
MohammedU
Microsoft SQL Server MVP
December 6, 2006 at 1:49 pm
glad it helped, RSingh;
i was thinking along those same lines awaiting your reply...maybe some indexes are in the filegroup, but not the objects they index;
way to go!
Lowell
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply