Wednesday, February 09, 2011

SharePoint Remote Blob Store with FILESTREAM Provider

To provision a Remote Blob Storage with FILESTREAM Provider provided by Microsoft, you have to follow instructions in this article:

Things to NOTE:

1. For me, the tables with prefix mssqlrbs in the content database somehow didn’t appear by running the following command so I had to use wizard to create those tables in the content database instead of following command:

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


  • <ContentDbName> is the database name.
  • <DBInstanceName> is the SQL Server instance name.

2. To Migrate all the data from Database to newly provisioned Blob Store, just execute following cmdlets in SharePoint Powershell:

$cdb = Get-SPContentDatabase -WebApplication <http://SiteName>
$rbss = $cdb.RemoteBlobStorageSettings

To reverse the process, execute following:


Upon running 1st Migrate Command, notice that in the “AllDocStreams” table in content database, the content is removed from the “Content” column and “Rbsid” is populated with IDs of content on file system. When we set the “active provider” back to none and then run the migrate command, the Rbsid column is emptied and “Content” column is populated with content.

3. FILESTREAM Provider Limitations: It doesn’t allow you to use anything other than local disk space. To use any other network storage, you have to write your own provider. Go to to get a basic version of custom RBS provider.

4. The SQLRemoteBlobs.dll path should be following after the installation of RBS: C:\Windows\assembly\GAC_MSIL\Microsoft.Data.SqlRemoteBlobs\\Microsoft.Data.SqlRemoteBlobs.dll

5. Must read following before customizing it (Specifications):

6. Garbage Collection:

C:\Program Files\Microsoft SQL Remote Blob Storage 10.50\Maintainer>Microsoft.Data.SqlRemoteBlobs.Maintainer.exe -ConnectionStringName RBSMaintainerConnection -Operation GarbageCollection -GarbageCollectionPhases r

With above command, the table “rbs_internal_blobs” is cleaned up. But the duplicated resources are not yet deleted from file system.

1 comment:

  1. Blocker : while executing


    I got this exception:

    Exception calling "GetProviderNames" with "0" argument(s): "SQL remote blob sto
    rage must be installed on each web front end server and on the content database
    before it may be used."
    At line:1 char:51
    + $rbss.SetActiveProviderName($rbss.GetProviderNames <<<< ()[0])
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException


Feel free to give constructive feedback or let me know if it was helpful.