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.
| 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 file group 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 telaanFirst 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. |
 |
|
|
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 |
 |
|
|
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 1The filegroup 'summary' cannot be removed because it is not empty. |
 |
|
|
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. |
 |
|
|
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. ;-) |
 |
|
|
|
|
|