Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 stackoverflow.com 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
add comment

Your Answer

 
discard

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