Set a content database to use RBS with FILESTREAM in SharePoint 2013
Applies to: SharePoint Server 2013, SharePoint Foundation 2013
Topic Last Modified: 2014-07-29
Summary: Learn how to set a SharePoint 2013 content database to use Remote BLOB Storage (RBS) with FILESTREAM.
This article describes how to set a content database to use Remote BLOB Storage (RBS) that uses the FILESTREAM provider. If you are using a third-party provider, these instructions might not apply. For more information, contact the manufacturer of the provider. These instructions assume that you have already installed RBS for use with SharePoint 2013. To install and configure RBS, see Install and configure RBS with FILESTREAM in a SharePoint 2013 farm.
In this article:
You must perform this procedure on every content database that you want to set to use RBS.
|Because SharePoint 2013 runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint 2013 supports the accessibility features of supported browsers. For more information, see the following resources:|
Before you begin this operation, review the following information about prerequisites:
The user account that you use to perform this procedure is a member of the Administrators group on the Web.
The user account that you use to perform this procedure is a member of the SQL Server dbcreator and securityadmin fixed server roles on the computer that is running SQL Server 2008 R2 with Service Pack 1 (SP1) or SQL Server 2012.
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 (http://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.|
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 SQL Server 2008 R2 with SP1 or SQL Server 2012.
Click Start, click All Programs, click Microsoft SQL Server 2012, 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.
Tip: 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. The operation should finish within approximately one minute.
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, make sure that RBS is installed and enabled correctly.