Set a content database to use RBS (SharePoint Foundation 2010)
Applies to: SharePoint Foundation 2010
This article describes how to set a content database to use Remote BLOB Storage (RBS). Its instructions assume that you have already installed RBS for use with Microsoft SharePoint Foundation 2010. To install and configure RBS, see Install and configure RBS (SharePoint Foundation 2010) or Upgrading from a stand-alone installation of Windows SharePoint Services 3.0 to SharePoint Foundation 2010 when content databases exceed 4 GB (RBS).
Set a content database to use RBS
To set a content database to use RBS, you must provision a binary large object (BLOB) store in SQL Server, add the content database information to the RBS configuration on a Web server, and then test the RBS data store.
These instructions assume that you have installed SQL Server Management Studio on the database server. If this is not the case, you can download and install Management Studio from Microsoft SQL Server 2008 Management Studio Express (https://go.microsoft.com/fwlink/p/?LinkID=186132&clcid=0x409). You can perform the following procedures on any Web server or application server in the farm. However, for simplicity in this article, we refer to this server as a Web server.
These instructions assume that you are using the FILESTREAM RBS provider. If you are using a different RBS provider, refer to that provider’s instructions to perform these operations.
To set a content database to use RBS
Verify that the user account that you use to perform this procedure is a member of the Administrators group on the Web server, and is a member of the SQL Server dbcreator and securityadmin fixed server roles on the computer that is running Microsoft SQL Server 2008 R2, SQL Server 2008 with Service Pack 1 (SP1) and Cumulative Update 2, or SQL Server 2005 with SP3 and Cumulative Update 3.
Click Start, click All Programs, click Microsoft SQL Server 2008, and then click SQL Server Management Studio.
In the Connect to Server dialog box, specify the server type, server name, and authentication method of the database server that you want to connect to, and then click Connect.
Right-click the content database for which you want to create a BLOB store, and then click New Query.
In the Query pane, copy and execute the following SQL queries in the sequence that is provided.
use [ContentDbName] 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 [ContentDbName] if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider') alter database [ContentDbName] add filegroup RBSFilestreamProvider contains filestream use [ContentDbName] alter database [ContentDbName] add file (name = RBSFilestreamFile, filename = 'c:\RBSStore') to filegroup RBSFilestreamProvider
Where [ContentDbName] is the content database name and c:\RBSStore is the volume\directory that will contain the RBS data store. Be aware that you can provision a RBS store only one time. If you attempt to provision the same RBS data store multiple times, you will receive an error.
For best performance, simplified troubleshooting, and as a general best practice, we recommend that you create the RBS data store on a volume that does not contain the operating system, paging files, database data, log files, or the tempdb file.
Click Start, click Run, type cmd into the Run text box, and then click OK.
Copy and paste the following command at the command prompt:
msiexec /qn /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME=<ContentDbName> FILESTREAMSTORENAME=FilestreamProvider_1 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE=<DBInstanceName>>
Where <ContentDbName> is the name of the content database, and <DBInstanceName> is the name of the SQL Server instance. The operation should finish within approximately one minute.
To test the RBS data store
Connect to a document library on any Web server.
Upload a file that is at least 100 kilobytes (KB) to the document library.
On the computer that contains the RBS data store, click Start, and then click Computer.
Navigate to the RBS data store directory.
Locate the folder that has the most recent modification date, other than the $FSLOG folder. Open this folder and locate the file that has the most recent modification date. Verify that this file has the same size and contents as the file that you uploaded. If does not, ensure that RBS is installed and enabled correctly.
Overview of RBS (SharePoint Foundation 2010)
Migrate content into or out of RBS (SharePoint Foundation 2010)