Friday, June 1, 2012

Enable and Configure FILESTREAM with SQL Server 2008 R2

To enable and change FILESTREAM settings

1.On the Start menu, point to All Programs, point to Microsoft SQL Server 2008 R2, point to Configuration Tools, and then click SQL Server Configuration Manager.

You may get a "Cannot connect to WMI provider" error if your instance is an upgraded instance or an uninstalled instance.




To resolve this, locate the file "sqlmgmproviderxpsp2up.mof"

Most probably the location will be at

C:\Program Files (x86)\Microsoft\Microsoft SQL Server\100\Shared\
OR
C:\Program Files (x86)\Microsoft SQL Server\100\Shared

run the following command C:\Program Files (x86)\Microsoft SQL Server\100\Shared\mofcomp sqlmgmproviderxpsp2up.mof




2.In the list of services, right-click SQL Server Services, and then click Open.

3.In the SQL Server Configuration Manager snap-in, locate the instance of SQL Server on which you want to enable FILESTREAM.

4.Right-click the instance, and then click Properties.

5.In the SQL Server Properties dialog box, click the FILESTREAM tab.

6.Select the Enable FILESTREAM for Transact-SQL access check box.

7.If you want to read and write FILESTREAM data from Windows, click Enable FILESTREAM for file I/O streaming access. Enter the name of the Windows share in the Windows Share Name box.

8.If remote clients must access the FILESTREAM data that is stored on this share, select Allow remote clients to have streaming access to FILESTREAM data.

9.Click Apply.

10.In SQL Server Management Studio, click New Query to display the Query Editor.

11.In Query Editor, enter the following Transact-SQL code:

EXEC sp_configure filestream_access_level, 2
RECONFIGURE

12.Click Execute.

13.Restart the SQL Server service.

Run the following Query to confirm SELECT SERVERPROPERTY ('FilestreamConfiguredLevel'),SERVERPROPERTY ('FilestreamEffectiveLevel');