how to set a network path for filestream filegroup
How to configure a database so that filestream data is stored on a non local path?
To enable filestream at db level I do first:
ALTER DATABASE MyDatabase ADD
FILEGROUP FileStreamFileGroup CONTAINS FILES开发者_如何学JAVATREAM;
GO
Then:
ALTER DATABASE MyDatabase ADD FILE (
NAME = MyDatabaseFileStreamFile,
FILENAME = 'c:\Test')
TO FILEGROUP FileStreamFileGroup ;
GO
Now instead of
c:\Test
I want to set a network path, for example:
\\Fileserver\Test
but this doesn't work:
ALTER DATABASE MyDatabase ADD FILE (
NAME = MyDatabaseFileStreamFile,
FILENAME = '\\Fileserver\Test') -- THIS IS NOT ACCEPTED
TO FILEGROUP FileStreamFileGroup ;
GO
How to achieve the desired result?
This is not supported. Although filestream data may be accessed remotely by clients, it must be local with respect to the Sql Server instance hosting it.
精彩评论