Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FileStream doesn't seem to get enabled

On one of our Dev DBs I am trying to enable FileStream.

I ran the script below and it is says it went from 0 - Disabled to 2 - Enabled:

Use FileStreamTest
GO
EXEC sp_configure 'filestream access level', 2
GO
RECONFIGURE
GO

But When I run this I get the error FILESTREAM is disabled?:

ALTER DATABASE FileStreamTest 
ADD FILEGROUP FS_FG_20110101
CONTAINS FILESTREAM
GO

Running this Shows a value of 2 (Enabled):

SELECT * FROM sys.configurations
WHERE name = 'filestream access level';

Error Message:

Msg 5591, Level 16, State 3, Line 1
FILESTREAM feature is disabled.

Any ideas what I am doing wrong?

EDIT: Do I have to go into the SQL Server Configuration manager and change the properties on the MSSQLSERVER instance (service) as well?

like image 235
scarpacci Avatar asked Dec 28 '10 22:12

scarpacci


People also ask

How do I enable Filestream feature?

Enabling FILESTREAMRight-click the instance, and then click Properties. In the SQL Server Properties dialog box, click the FILESTREAM tab. Select the Enable FILESTREAM for Transact-SQL access check box. If you want to read and write FILESTREAM data from Windows, click Enable FILESTREAM for file I/O streaming access.

How does Filestream work in SQL Server?

FILESTREAM integrates the SQL Server Database Engine with an NTFS or ReFS file systems by storing varbinary(max) binary large object (BLOB) data as files on the file system. Transact-SQL statements can insert, update, query, search, and back up FILESTREAM data.

What is the difference between Filestream and FileTable?

FileStream and FileTable are features of SQL Server for storing unstructured data in SQL Server alongside other data. The FileStream feature stores unstructured data in the file system and keeps a pointer of the data in the database, whereas FileTable extends this feature even further allowing non-transactional access.


2 Answers

On SQL Server 2008 R2 it is necessary to restart the SQL server service after the reconfiguration even when you execute RECONFIGURE or RECONFIGURE WITH OVERRIDE.

Proof:

SELECT * FROM sys.configurations WHERE name = 'filestream access level';

returns the value for configuration setting 1580 "filestream access level" as 2 but value_in_use 1.

After a restart of the service, the problem goes away and there is one obstacle less on the winding road of FILESTREAM configuration.

like image 89
Cee McSharpface Avatar answered Oct 19 '22 21:10

Cee McSharpface


Yes, you do need to enable file stream through SQL Server Configuration Manager. Here is some more information.

like image 17
bobs Avatar answered Oct 19 '22 21:10

bobs