Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Can't drop empty filegroup

Author  Topic 

telaan
Starting Member

3 Posts

Posted - 2005-09-19 : 20:12:06
Hi All,
This one is driving me nuts. I've emptied the filegroup by dropping all the files. sp_helpfilegroup shows 0 files in the filegroup but I'm still getting a can't drop because the filegroup isn't empty. I even ran DBCC UPDATEUSAGE in hopes it was a system table that wasn't updated. Does anyone know what might be going on?

Thanks!

Sharky
Starting Member

23 Posts

Posted - 2005-09-20 : 11:10:51
Hi telaan

First remove all the database files (.mdf or .ndf) that are on the filegroup you would like to delete, then remove the filegroup. Hope it works.
Go to Top of Page

Sharky
Starting Member

23 Posts

Posted - 2005-09-20 : 11:13:51
Apologies - I need reading lessons!!! ;-) You already removed the files... Let me know if you get it sorted
Go to Top of Page

telaan
Starting Member

3 Posts

Posted - 2005-09-21 : 17:05:36
Thanks for the reply. :) I'm still stuck with the filegroup. It's not primary or default and it's empty. I've tried cycling the services, but not the server. Still getting this message:
Server: Msg 5042, Level 16, State 8, Line 1
The filegroup 'summary' cannot be removed because it is not empty.
Go to Top of Page

telaan
Starting Member

3 Posts

Posted - 2005-09-22 : 10:49:11
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.
Go to Top of Page

Sharky
Starting Member

23 Posts

Posted - 2005-09-23 : 04:10:00
Great - glad you got it sorted, thanks for the update. Something to keep in mind. ;-)
Go to Top of Page
   

- Advertisement -