Monday, March 29, 2010

Enable FILESTREAM (RBS) for SharePoint 2010

    Technet article: http://technet.microsoft.com/en-us/library/ee748631%28office.14%29.aspx

    Run the following commands in SQL Server management query window. Change the database name as needed.

    use [WSS_Content]

    if not exists (select * from sys.symmetric_keys where name = N'##MS_DatabaseMasterKey##')

    create master key encryption by password = N'Admin Key Password !2#4'

    clip_image001

    use [WSS_Content]

    if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')

    alter database [WSS_Content]

    add filegroup RBSFilestreamProvider contains filestream

    use [WSS_Content]

    alter database [WSS_Content]

    add file (name = RBSFilestreamFile, filename = 'c:\Blob')

    to filegroup RBSFilestreamProvider

    clip_image002

    After activating this three commands you will find some files in the new folder c:\blob. Important. This folder will be created by the sql command.

    clip_image003

    Install RBS

    http://go.microsoft.com/fwlink/?LinkId=177388

    clip_image004

    Do not run the msi file directly.

    On the database and first SQL server run the following command:

    msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1

    Fill in the SQL instance name for specific SQL server instances.

    Run the following command on all other SharePoint servers:

    msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi DBNAME="WSS_Content" DBINSTANCE="" ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer"

    Check rbs_install_log.txt after installation:

    >>>> Product: SQL Remote Blob Storage -- Installation completed successfully.

    To enable RBS on a specific web application open the SharePoint Management Shell on run this commands

    $cdb = Get-SPContentDatabase –WebApplication http://moss2010server

    $rbss = $cdb.RemoteBlobStorageSettings

    $rbss.Installed()

    $rbss.Enable()

    $rbss.SetActiveProviderName($rbss.GetProviderNames()[0])

    $rbss

    clip_image005

    After the activation you can find additionals files and folder in the blob folder

    clip_image006

    After uploading a file (in this example rbs_install_log.txt) in a document library

    clip_image007

    You will find new folders and files (with guid names) in the blob directory structure.

    clip_image008

    If you upload a new version of this file, the new file will be place in the same folder with a new name. SharePoint does not save the difference only.

    clip_image009

6 comments:

Unknown said...

Hi Bernd,

Wonderfull post. I followed your post exactly and was able to Enable the RBS only on one Content DB, But I wanted to enbale RBS on more than one Content DB.

In step 2, I changed the Content Db name and run the command. the rbs_install_log.txt file shows the phrase "configuration completed successfully" but the Installed() method on RemoteBlobStorageSettings object shows 'false'.

Is enabling RBS restricted to one ContentDB in the SP 2010 farm? Or Am I missing something here?

thanks,
-Imran

PS: I have SharePoint 2010 RTM installed on my VM.

Nikhil Chauhan said...

Can we have same folder structure as in our library?

joe keyrouz said...

Can we have same folder structure as in our library?
pls i need to know if this is possible and in which table we can find the file's name the rbs gives in our local drive

PuneRoot said...

Excellent post. I followed your post, enabled RBS on one Content DB. It is working from one WFE; but it is not working from other WEF. even though I run following command on all WFEs

msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi DBNAME="WSS_Content" DBINSTANCE="" ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer"

Looks like I missed some step?

Unknown said...


Hi, probably our entry may be off topic but anyways, I have been surfing around your blog and it looks very professional.
Sharepoint Remote Blob Storage

naviathan said...

You sir, just saved me from an expensive license fee and angry management. Thank you.