Install and configure RBS (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010

This article describes how to install and configure Remote BLOB Storage (RBS) for a database server that supports a Microsoft SharePoint Server 2010 farm.

Tip

RBS can be used with SQL Server 2008 or SQL Server 2008 R2. However, you must install the SQL Server 2008 R2 RBS binaries. The binaries are part of the SQL Server 2008 Feature Pack, October 2008 and the SQL Server 2008 R2 Feature Pack.

To use RBS, you must do the following:

  • Enable FILESTREAM on the database server - By default, FILESTREAM components are installed but are not enabled.

  • Provision a BLOB store for each content database- BLOB stores are folders where the BLOB data is stored on the file system. You must provision a BLOB store for each content database for which you want to use RBS.

  • Install the RBS client library on each Web server – The RBS client library stores the BLOB data on the file system, enable fidelity checks, and perform other tasks.

  • Enable RBS for each content database - You must enable RBS for each content database for which you want to use RBS.

  • Test the RBS installation

The user account that you use to perform the procedures that are described in this article must have the following memberships:

  • Administrators group on the Web servers and application servers.

  • SQL Server dbcreator and securityadmin fixed server roles on the computer that is running SQL Server 2008.

Enable FILESTREAM on the database server

By default, the FILESTREAM feature is installed when you install SQL Server 2008, but it is not enabled. You must enable and configure FILESTREAM on the computer that is running SQL Server 2008 that hosts the SharePoint Server 2010 databases. To enable and configure FILESTREAM, follow the instructions in How to: Enable FILESTREAM (https://go.microsoft.com/fwlink/p/?LinkID=166110&clcid=0x409). You only have to enable FILESTREAM one time for each database server where you want to use RBS.

Provision a BLOB store for each content database

After you have enabled and configured FILESTREAM, provision a BLOB store on the file system as described in the following procedure. You must provision a BLOB store for each content database.

To provision a BLOB store

  1. Click Start, click All Programs, click Microsoft SQL Server 2008, and then click SQL Server Management Studio.

  2. Connect to the instance of Microsoft SQL Server that hosts the content database.

  3. Expand Databases.

  4. Click the content database for which you want to create a BLOB store, and then click New Query.

  5. Paste the following SQL queries in Query pane, and then execute them in the sequence listed. In each case, replace [WSS_Content] with the content database name, and replace c:\BlobStore with the volume\directory in which you want the BLOB store created. The provisioning process creates a folder in the location that you specify. Be aware that you can provision a BLOB store only one time. If you attempt to provision the same BLOB store multiple times, you will receive an error.

    Tip

    For best performance, simplified troubleshooting, and as a general best practice, we recommend that you create the BLOB store on a volume that does not contain the operating system, paging files, database data, log files, or the tempdb file.

    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'
    
    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:\Blobstore') 
    to filegroup RBSFilestreamProvider
    

Install the RBS client library on each Web server

You must install RBS client library on all Web servers in the SharePoint farm. The RBS client library is installed only once per Web server, but RBS is configured separately for each associated content database. The client library consists of a client-side dynamic link library (DLL) that is linked into a user application, and a set of stored procedures that are installed on Microsoft SQL Server. 

Warning

Do not install the RBS client library by running the RBS.msi file and starting the Install SQL Remote BLOB Storage wizard. The wizard sets certain default values that are not recommended for SharePoint Server 2010.

To install the RBS client library on the on the first Web server

  1. On any Web server, browse to https://go.microsoft.com/fwlink/?LinkID=188395&clcid=0x409 if you are running SQL Server 2008 or https://download.microsoft.com/download/E/4/8/E48816F7-4612-432E-B135-0F90C0211701/RBS_X64.msi if you are running SQL Server 2008 R2 and download the MSI file for 64-bit platforms.

  2. Click Start, click Run, type cmd into the Run text box, and then click OK.

  3. Copy and paste the following command into the Command Prompt window. Replace WSS_Content with the database name, replace RBS with “RBS.msi” if you are running SQL Server 2008 R2 or “RBS_64.msi” if you are running SQL Server 2008, and replace DBInstanceName with the SQL Server instance name. You should run this command by using the specific database name and SQL Server instance name only one time. The operation should finish within approximately one minute.

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

To install the RBS client library on all additional Web and application servers

  1. On a Web server, download the RBS.msi at https://go.microsoft.com/fwlink/?LinkID=188395&clcid=0x409.

  2. Click Start, click Run, type cmd into the Run text box, and then click OK.

  3. Copy and paste the following command into the Command Prompt window. Replace WSS_Content with the database name, and replace DBInstanceName with the name of the SQL Server instance. The operation should finish within approximately one minute.

    msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" ADDLOCAL=Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer
    
  4. Repeat this procedure for all Web servers and application servers in the SharePoint farm.

To confirm the RBS client library installation

  1. The rbs_install_log.txt log file is created in the same location as the RBS.msi file. Open the rbs_install_log.txt log file by using a text editor and scroll toward the bottom of the file. Within the last 20 lines of the end of the file, an entry should read as follows: Product: SQL Remote Blob Storage – Installation completed successfully.

  2. On the computer that is running SQL Server 2008, verify that the RBS tables were created in the content database. Several tables should be listed under the content database that have names that are preceded by the letters "mssqlrbs".

Enable RBS for each content database

You must enable RBS on one Web server in the SharePoint farm. It is not important which Web server that you select for this activity, as long as RBS was installed on it by using the previous procedure. You must perform this procedure once for each content database.

Note

You can only enable RBS by using Windows PowerShell.

To enable RBS by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    $cdb = Get-SPContentDatabase <ContentDatabaseName>
    $rbss = $cdb.RemoteBlobStorageSettings
    $rbss.Installed()
    $rbss.Enable()
    $rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
    $rbss
    

    Where:

    • <ContentDatabaseName> is the name of the content database.

For more information, see Get-SPContentDatabase.

Test the RBS installation

You should test the RBS installation on one Web server in the SharePoint farm to make sure that the system works correctly.

To test the RBS data store

  1. On the computer that contains the RBS data store, click Start, and then click Computer.

  2. Browse to the RBS data store directory.

  3. Confirm that the folder is empty.

  4. On the SharePoint farm, upload a file that is at least 100 kilobytes (KB) to a document library.

  5. On the computer that contains the RBS data store, click Start, and then click Computer.

  6. Browse to the RBS data store directory.

  7. Browse to the file list and open the file that has the most recent changed date. This should be the file that you uploaded.

See Also

Concepts

Overview of RBS (SharePoint Server 2010)
Plan for RBS (SharePoint Server 2010)

Other Resources

How to: Enable FILESTREAM
Resource Center: Installation and Deployment for SharePoint Server 2010