I would like to change the path for a SQL Server Filestream but I can't find any information on this. I know how to change the mdf and ldf filenames, but can't seem to find how to change the folder name where the FileStream stores the data.
Asked
Active
Viewed 7,998 times
2 Answers
1
- Alter database modify file setting the new path. The file/file group will be set to offline.
- Manually copy the Filestream container to the new location specified in (1).
- Bring the file/file group back online.
Starting with Sql Server 2008 R2 you can do the operation online by adding a second Filestream container (located in the new folder) to the current file group, then shrink the original container (WITH EMPTY option). Once all data is migrated and garbage collected so that the original container is empty, you can remove it from the Filestream file group.
![](../../users/profiles/37224.webp)
Pawel Marciniak
- 205
- 1
- 4