Thursday, March 8, 2012

Can't remove empty file group - no files in sysfiles

Hi,
I've dropped all the files in my index filegroup (not default) but I
get this message when I try to remove the filegroup itself.
Server: Msg 5042, Level 16, State 8, Line 1
The filegroup 'xxxxx' cannot be removed because it is not empty.
Sysfiles isnt' listing the deleted files and sysfilegroups is showing
that there are 0 files in the filegroup. I've confirmed this by
looking at the properties of the database through EM. I've tried
cycling the services but I still can't drop the filegroup. Does anyone
know why I can't remove the filegroup? Any help would be greatly
appreciated.
I'm running SQL Server 2000 sp3
Thanks!
TelaanIs this the primary filegroup? If so, you can't remove it.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"telaan" <telaan@.hotmail.com> wrote in message
news:1127245241.370186.158990@.g47g2000cwa.googlegroups.com...
Hi,
I've dropped all the files in my index filegroup (not default) but I
get this message when I try to remove the filegroup itself.
Server: Msg 5042, Level 16, State 8, Line 1
The filegroup 'xxxxx' cannot be removed because it is not empty.
Sysfiles isnt' listing the deleted files and sysfilegroups is showing
that there are 0 files in the filegroup. I've confirmed this by
looking at the properties of the database through EM. I've tried
cycling the services but I still can't drop the filegroup. Does anyone
know why I can't remove the filegroup? Any help would be greatly
appreciated.
I'm running SQL Server 2000 sp3
Thanks!
Telaan|||Nope. Just an additional filegroup I used to put indexes in.|||When you emptied the files, did you use the EMPTYFILE option with DBCC
SHRINKFILE?
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"telaan" <telaan@.hotmail.com> wrote in message
news:1127245751.943569.313230@.g44g2000cwa.googlegroups.com...
Nope. Just an additional filegroup I used to put indexes in.|||does the file group is is a default file group?.|||If you are going to drop a filegroup, then you should make another group the
default.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Praveen" <apveen@.gmail.com> wrote in message
news:1127295464.994452.116930@.o13g2000cwo.googlegroups.com...
does the file group is is a default file group?.|||Thanks for the replies. The filegroup wasn't default but I've found
the problem by running the profiler to find out what system table still
had the filegroup referenced. It was the sysindexes table holding old
stats. You can find by running this query.
select name,id from dbo.sysindexes where groupid = 2 --id of filegroup
you want to drop.
I dropped the stats and was able to drop the filegroup.

No comments:

Post a Comment