Enabling RBS on multiple content databases

Remote Blog Storage in SharePoint 2010 can be enabled on multiple content databases. The steps you’ll need to take are:

  1. Run SQL script on first content database
  2. Run RBS.msi installation on primary WFE
  3. Run RBS.msi installation on secondary WFE, if any
  4. Run PowerShell script to enable RBS on content database
  5. Run SQL script on second content database
  6. Run RBS.msi installation on primary WFE, with different parameters than step 2
  7. Run RBS.msi installation on secondary WFE, if any, with different parameters than step 3
  8. Run PowerShell script to enable RBS on content database
First, the script:

Note that the “Admin Key Password !2#4” value is something you may modify. Also note that the Blob Storage location (C:\BlobStorage_ContentDbName) must be unique for each content database.

Once the above script has been run on the first content database, download RBS.msi from the SQL 2008 R2 Feature Pack (download the one listed as RBS_X64.msi).

On your primary WFE, run the following command only for the first content database you are enabling with RBS.

Obviously change the “ContentDbName” parameters to the content database you ran the SQL script against. The DBINSTANCE can either be localhost (if SQL is installed locally), the remote SQL Server name, or SQL Server Name and instance name (e.g. SQLSERVERINSTANCE). The FILESTREAMGROUP parameter should be identical to the “filegroup” in the SQL Script on line 8 above.
Next, on the secondary WFE, if you have one, again you will need RBS.msi to run the following:

Validate that the RBS tables exist in the Content Database by running the following SQL script on the Content Database:

If tables are returned, the RBS provider has been installed successfully. If no tables are returned, check the RBS install log and also check for typos in your msiexec command.
Now, on either WFEs, run the following PowerShell script using the SharePoint 2010 Management Shell:

This should initialize RBS for the first content database. To test, upload a file to a SharePoint site covered by the Content Database that is over 100KB, then check the Blob Storage location as defined by the SQL script. A new folder with a GUID should be created, along with a sub folder  and there should be at least one file present in the directory which should be the size of your uploaded file. Another way to check if RBS is functional is to run:

This will migrate all eligible files out of the content database into the RBS file stream. Note this operation may take some time to complete depending on the size of the content in the database.

Another option you may want to set is to limit the files eligible to participate in RBS. To do this, run:

For the second, or more content databases, again run the SQL script, changing the values of ContentDbName where present to reflect the Content Database.

Instead of the original msiexec command, run the following msiexec command on subsequent databases:

On the secondary WFE, run:

After the script runs successfully, run the PowerShell script against the second content database. Again, uploading a file should work, as should $rbs.Migrate() if you choose to do that.

Make sure to look at the information outlined in the TechNet article Maintain Remote BLOB Storage (RBS) for ongoing maintenance of RBS-enabled Content Databases.

4/3/2011 EDIT: Some have said that they’ve been unable to get this working properly.  Note that this particular SharePoint instance, pictured below, is a single server (Complete) installation (WFE/App/SQL on one VM).  The SQL script should not be a mystery as it doesn’t change from database-to-database (besides database name and RBS file path).  Ignore my errors :)

Installing the RBS provider on the first and second database.  One thing to note is that I have waited between the installations for the RBS provider installation to finish, by tracking the MsiInstaller Application event log entries.  The first RBS.msi installation should yield an MsiEvent 1033:

The second (and subsequent) RBS.msi installations should yield an MsiEvent 1035:

And here is an image of the command prompt.

RBSInstall

And then the entire process for the SharePoint Management Shell, from confirming the RBS installation to migrating content from both content databases via the RBS provider.

RBSEnableAndMigrate
RBSEnableAndMigrate2

And here is the file system containing two files each (all that was uploaded to WebApp1 and WebApp2) these files can be opened by Word (they’re both docx) or Notepad/Wordpad if Word is not installed, to view their content.

RBSFileSystem1

RBSFileSystem2

Hopefully this helps anyone struggling to get RBS enabled on multiple content databases.  If anyone has any questions, please let me know.  I may also be able to make a movie of the entire process for two content databases, if that could be helpful.

18 Comments

  1. Hey thanks a lot. Been going round and round with that second msiexec. I got the second DB going but the 3rd and 4th for some reason wouldn't take. Your msiexec did the trick.

  2. Yes, this helped us get it going, THANKS!

  3. Thanks for this article..this helped a lot..:)

  4. Excellent article!! I was struggling with the second RBS – your msiexec and sp powershell codes were right on.

  5. thanks for this article, but if i have to send blobs to a multiple file systems by using a web services, how can i put a parameter into rbs installation to specify the urls of the services
    (i already done it for one AppPool by putting his web service url into an xml file and parsing it in the FileProviderStore code, the path to ths xml file is hard coded).

  6. Nice article especially when it comes to setting up additional content database for RBS. However, you are missing = sign in this line.

    #where 1024 bytes = 1kb. This value is in Bytes
    $rbs.MinimumBlobStorageSize = 1024

  7. Excellent Post & very helpful………….We are making Custom RBS Provider………….

  8. This is a GREAT article, however, I could still not get it to work properly. Anytime I try to upload a document, I get an error saying that the URL for my file is invalid.

  9. Hey, great article , I have one question though how can we differentiate between the first and second database on the second front end webserver?. Is there a sql command or something if we want to know this.

    Thanks

  10. The silent install for RBS.msi specified here does not actually work for SQL Server 2012 & SP 2013. When installing it on the additional content databases, the RBS install automatically overrides the DBNAME property with the original content database name, and thus attempts to create the file stream provider and DB tables on the original content DB. You need to do a manual install of RBS on the web server for it to work on the additional content DBs. See this article for the steps to do this: http://blog.unserkleinesbonn.de/markus/2013/01/06/howto-enable-rbs-on-multiple-sharepoint-2013-content-databases-on-a-sql-2012-backend/

  11. Hi,
    Ive folowed what is writen in that link and I didnt suceed to install and configure RBS.
    In my case, $rbss.Installed() return False and the next command, give an error:
    PS C:\Users\GBURCUS> $rbss.Installed()
    False
    PS C:\Users\GBURCUS> $rbss.Enable()
    Exception calling “Enable” with “0” argument(s): “SQL remote blob storage must
    be installed on each web front end server and on the content database before
    it may be used.”
    At line:1 char:1
    + $rbss.Enable()
    + ~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException
    Ive folow another
    If I
    m usisng a second content DB (Ive cereated one in CA) , I can install and configure RBS in that one but it didnt work.
    Is not puting the BLOB in File System, it is still using the own content DB
    Any ideea what I`m doing wrong?
    Thanks
    Grig

  12. Myself I’ve installed and configure RBS (correctly) in Sharepoint 2013 but doesn’t work.
    It doesn’t put any file in File System. The BLOB folder is still empty after uploading a big file.
    Any idea why?
    Other people seems to have the same issue:
    http://social.technet.microsoft.com/Forums/exchange/en-US/e279451f-fe02-4e9f-8e97-30290bdbdc35/rbs-with-sharepoint-2013-and-sql-2012-almost-working?prof=required

  13. Myself I’ve installed and configure RBS (correctly) in Sharepoint 2013 but doesn’t work.
    It didn’t put any file in File System (BLOB Storage). The rights seems to be ok.
    Any idea why?
    Other people seems to have the same issue:
    http://social.technet.microsoft.com/Forums/exchange/en-US/e279451f-fe02-4e9f-8e97-30290bdbdc35/rbs-with-sharepoint-2013-and-sql-2012-almost-working?prof=required
    Thanks
    Grig

  14. Myself I’ve installed and configure RBS (correctly) in Sharepoint 2013 but doesn’t work.
    It didn’t put any file in File System.
    Any idea why?
    Other people seems to have the same issue:
    http://social.technet.microsoft.com/Forums/exchange/en-US/e279451f-fe02-4e9f-8e97-30290bdbdc35/rbs-with-sharepoint-2013-and-sql-2012-almost-working?prof=required

  15. I have installed and configured RBS in SharePoint 2010 environment. I can see the uploaded files in the blob store but I see a duplicate file every time I update the metadata of the file in the SharePoint library. And also a duplicate file whenever a new version of file is added.
    Is this an issue or a default behavior of RBS?. If this is a default behavior, why do we see an additional file in the blob store with the same size of the file?

  16. Important note:

    Make sure your IIS AppPool Identity Account has db_rbs_admin rights on the Content Database.

    You can set these rights as soon as you’ve installed the RBS plugin.

  17. Sir, thank you so very much, you really saved me

Leave a Reply