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 http://sqlrbs.codeplex.com 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\10.50.0.0__89845dcd8080cc91\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.