Reputation: 4570
I've added Filestream to an existing SQL Server 2017 instance. I've already activated Filestream support in the SQL Server services configuration:
I've also updated the instance so that is has full access to the filestream:
And I've also configured the db so that it's accessible through the Assistencias
folder name:
And then I've added a new FileTable
to the database:
CREATE TABLE [dbo].[FicheirosImportacao] AS FILETABLE ON [PRIMARY] FILESTREAM_ON [FILES]
WITH
(FILETABLE_DIRECTORY = N'FicheirosImportacao',
FILETABLE_COLLATE_FILENAME = Latin1_General_CI_AI)
I've also added a couple of logins to the SQL Server instance which are mapped to existing AD Accounts and I've went ahead and gave the select, insert, update and delete permissions to those users:
grant insert, update, select on dbo.ficheirosimportacao to [domain\username]
Even though the users can perform several operations (add new files, change their contents or delete them) through the net share (\machine\instance\db\file table name
), there's one operation which they can't do: change the name of an existing file.
When they try to do that, they'll always end up getting an error which says that the file is too large for the destination file system. The following image shows what happens when I try to rename a file which is empty and was initially named New Text Document.txt
:
I've installed the filestream feature on different SQL Servers and on those instances everything is working out fine and the users are able to change the name of the files.
What am I missing here?
Upvotes: 1
Views: 675
Reputation: 2139
I've recently had this issue and it was only a problem when the database files were located in the default install location C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA
.
Once I moved the database files to another location D:\MSSQLSERVER
I was able to rename files/folders as expected.
I've been able to replicate this behaviour on 2 devices, I assume there are some incorrect permissions being applied or Windows Defender doing something.
Upvotes: 0