Sql-server – Move content between filestream containers

filestreamsql serversql-server-2012

I have a server running SQL Server 2012 with Multiple Filestream containers on a single table.

I need to split one of the existing filestream containers into two parts by creating a new filestream container and moving the data across.

How can reliably move content between filestream containers?

I have the first container set to not grow any further but how can I move the files to another container without writing to a whole new table? Is there a way to do an UPDATE statement that will cause SQL Server to write the file to disk again? – I have thought of appending an additional byte of data and then removing it afterwards to make SQL Server write the content as new files, but is there a better way?

Best Answer

According to Paul Randal (who is as reliable as they come) there is no simple way to do this and you essentially have to recreate the table in a new filegroup that is pointed to your new filestream location. The link is there so you can see for yourself, but this looks like the only real alternative. It is not an ideal one, obviously but it should get you the end result that you need. But not in a simple fashion, I am sorry to say.