Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have migrated all our varbinary(max) column data to Azure Blob Storage and so we want to remove the old filestream columns that remain in our Sql 2008 database and the filestream filegroup but when we try to we are getting the error:

Msg 5042, Level 16, State 11, Line 2
The filegroup 'FileStreamGroup' cannot be removed because it is not empty.

However when we run this:

exec sp_helpfilegroup 'FileStreamGroup'

It is returning this:

groupname           groupid    filecount
FileStreamGroup     2          0

So the file count is 0 but it won't let us remove it, has anybody else had this problem and how on earth do you completely remove the filestream from the database.

In addition this query:

select * from sys.tables t 
join sys.data_spaces ds on t.filestream_data_space_id = ds.data_space_id 

Returns 0 rows so no tables are using any filestream data if I understand this correctly.

share|improve this question

migrated from Jun 6 '13 at 18:46

This question came from our site for professional and enthusiast programmers.

According to the SQL Azure documentation, filegroup operations are not supported because you "cannot control the physical resources of Windows Azure SQL Database" so this may actually be intended behaviour. The DBA site might be a better place to ask, though. – Pondlife Jun 6 '13 at 14:15
I'm really sorry I have worded this terribly and I apologise, I have edited now to make it clearer. – user351711 Jun 6 '13 at 18:43

I had the same problem. Eventually I worked out that I needed to change the db recovery model from "Full" to "Simple", and then I could delete my filestream files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.