SQL FILESTREAM 功能被禁用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21093255/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
FILESTREAM feature is disabled
提问by Zteck
I have a database set up with FILESTREAM enabled on it (if you go to Properties\Advanced on the instance, it shows that FILESTREAM is enabled). I also ran the sp_configure script on it after doing this to enable the access (to make sure it was enabled). But...as soon as I try to alter the database and add the filegroup to it, it says that the feature is disabled.
我设置了一个启用了 FILESTREAM 的数据库(如果您转到实例上的 Properties\Advanced,它会显示 FILESTREAM 已启用)。执行此操作后,我还在其上运行了 sp_configure 脚本以启用访问(以确保已启用)。但是...一旦我尝试更改数据库并将文件组添加到其中,它就会说该功能已禁用。
I have it enabled on other instances on the same computer, and those work fine. It is only this one that is not working. I have not been able to find any good suggestions as to why it is not working.
我在同一台计算机上的其他实例上启用了它,并且这些工作正常。只有这个不起作用。我无法找到任何关于它为什么不起作用的好建议。
It is a SQL 2008 R2 instance.
它是一个 SQL 2008 R2 实例。
回答by Mojo
I was unable to script this, (using the link provided by user1977061), as the MSSQLService requires a restart afterwards to apply the change. Even after doing this it didn't work, and instead I had to manually configure FILESTREAM usage via:
我无法编写此脚本(使用 user1977061 提供的链接),因为 MSSQLService 之后需要重新启动才能应用更改。即使这样做后它也不起作用,而是我不得不通过以下方式手动配置 FILESTREAM 使用:
- SqlServer Configuration Manager
- Sql SQL Server Services
- SQL Server(MSSQLSERVER) [Properties]
- FILESTREAM tab - enable the first 2, and optionally 3rd check box.
- SqlServer 配置管理器
- SQL Server 服务
- SQL Server(MSSQLSERVER) [属性]
- FILESTREAM 选项卡 - 启用前 2 个和可选的第三个复选框。
Look at the SQLServer properties > Advanced > Running Values value for "Filestream Access Level" to ensure that the FILESTREAM is actually enabled if in doubt.
查看“文件流访问级别”的 SQLServer 属性 > 高级 > 运行值值,以确保在有疑问时实际启用了 FILESTREAM。
回答by SchmitzIT
Was FILESTREAM
enabled on the instance level, though?
但是,是否FILESTREAM
在实例级别启用?
Right-click the server and select Properties
. Then on the Advanced
page, ensure that FILESTREAM Access Level
is not set to Disabled
(Which I believe is default):
右键单击服务器并选择Properties
。然后在Advanced
页面上,确保FILESTREAM Access Level
未设置为Disabled
(我认为这是默认值):
回答by Anthony F
Changing the FILESTREAM settings through SQL Server Management Studio -> Properties -> Advanced had no effect for me, and SQL Server Configuration Manager kept giving me an error when I enabled FILESTREAM there:
通过 SQL Server Management Studio -> Properties -> Advanced 更改 FILESTREAM 设置对我没有影响,当我在那里启用 FILESTREAM 时,SQL Server 配置管理器一直给我一个错误:
There was an unknown error applying the FILESTREAM settings.
Check the parameters are valid. (0x80041008)
应用 FILESTREAM 设置时出现未知错误。
检查参数是否有效。(0x80041008)
Digging around on the internet led me here as well as to this page: https://social.msdn.microsoft.com/forums/sqlserver/en-US/d8060fdd-4583-4bf7-bdcf-4fd053d5d2c0/unknown-error-applying-the-filestream-settings
在互联网上挖掘使我来到这里以及这个页面:https: //social.msdn.microsoft.com/forums/sqlserver/en-US/d8060fdd-4583-4bf7-bdcf-4fd053d5d2c0/unknown-error-applying -the-filestream-settings
Fortunately one of the suggestions there was the solution. Connect to the server with SQL Server Management Studio and run this script:
幸运的是,其中一项建议是解决方案。使用 SQL Server Management Studio 连接到服务器并运行此脚本:
sp_configure 'filestream access level', 2
reconfigure with override
Note: This was for 64-bit SQL Server 2012
注意:这是针对 64 位 SQL Server 2012
回答by Caleb Seadon
I've done this a thousand times and always follow the steps as Mojo outlines above. However I found that on one computer I couldn't get this to work unless I changed SQL Server Service from running as NT Service to running under a local account. I even reinstalled SQL Server, no luck.
我已经这样做了一千次,并且总是按照上面 Mojo 概述的步骤进行操作。但是我发现在一台计算机上我无法让它工作,除非我将 SQL Server 服务从作为 NT 服务运行更改为在本地帐户下运行。我什至重新安装了 SQL Server,但没有运气。
I did as follows:
我做了如下:
- Click start
- Type 'compmgmt.msc'
- Expand 'Services and Applications'
- Sql Server Configuration
- Right Click on 'SQL Server (MSSQLSERVER)' and choose 'Properties'
- On the Log On tab, change the user to a local account
- 点击开始
- 输入'compmgmt.msc'
- 展开“服务和应用程序”
- Sql Server 配置
- 右键单击“SQL Server (MSSQLSERVER)”并选择“属性”
- 在登录选项卡上,将用户更改为本地帐户
Maybe one day this will save someone from banging their head on their desk until their eyeballs pop-out.
也许有一天,这将使某人免于将头撞在桌子上直到眼球弹出。
回答by Caleb Seadon
If you still are having problems with this i suggest you checkout this link!
如果您仍然遇到问题,我建议您查看此链接!
I had the same problem in which only one instance didn't activate filestream properly. The solution seems to be to use the SQL Server Configuration Manager and enable it from there.
我遇到了同样的问题,其中只有一个实例没有正确激活文件流。解决方案似乎是使用 SQL Server 配置管理器并从那里启用它。
回答by Hans Ke?ing
In addition to the other answers: the account that is used by the sql server service must be a member of the Administrators group.
除了其他答案:sql server 服务使用的帐户必须是管理员组的成员。
Symptom: the "Configured value" in the server properties does show "enabled", but the "Running value" stays at "disabled".
故障现象:服务器属性中的“配置值”确实显示为“启用”,但“运行值”保持为“禁用”。
回答by N. Little
I got this working by enabling filestream not in SQL Management Studio but in SQL Configuration Manager. See https://docs.microsoft.com/en-us/sql/relational-databases/blob/enable-and-configure-filestream?view=sql-server-2017.
我通过不在 SQL Management Studio 中而是在 SQL 配置管理器中启用文件流来实现此目的。请参阅https://docs.microsoft.com/en-us/sql/relational-databases/blob/enable-and-configure-filestream?view=sql-server-2017。
回答by greg93
For me this worked out:
对我来说,这解决了:
- forget about Microsoft SQL Server Management Studio to solve this bug
- find SQLServerManager**.msc in folder C:\Windows\SysWOW64 and open it
- enable filestream as in the picture, by clicking on properties
- 忘记 Microsoft SQL Server Management Studio 来解决这个错误
- 在文件夹 C:\Windows\SysWOW64 中找到 SQLServerManager**.msc 并打开它
- 通过单击属性启用图片中的文件流
- Database import should work then!
- 数据库导入应该可以工作了!
回答by LaBracca
I also stumbled into this problem and by trial and error i found out that the solution was to change the account under which Sql Server runs so from SS Configuration manager i located the sql server instante, right clicked "Properties" and on the "LOg On" tab i changed Logon as "This account" to "Bulil-in account", where i choose "Local system".
我也偶然发现了这个问题,通过反复试验,我发现解决方案是更改运行 Sql Server 的帐户,因此从 SS 配置管理器我找到了 sql server 实例,右键单击“属性”并在“登录“选项卡我将登录为“此帐户”更改为“内置帐户”,我选择“本地系统”。
After a service restart all went fine.
服务重启后一切正常。
回答by pcons
For me only the combination of SchmitzIT and Mojo suggestions made it work
对我来说,只有 SchmitzIT 和 Mojo 建议的结合才能使它起作用