Updated: 2009-11-12
[This article is pre-release documentation and is subject to change in future releases.]
This article describes how to install and configure Remote BLOB Storage (RBS) for a Microsoft SQL Server 2008 database server that supports a Microsoft SharePoint Foundation 2010 farm.
In this article:
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
Microsoft SQL Server.
Introduction to RBS
RBS is designed to move the storage of binary large objects (BLOBs) from database servers to commodity storage solutions. A reference to the BLOB is stored in the database. RBS is an add-on that can be applied to SQL Server 2008. It uses auxiliary tables, stored procedures, and an executable to provide its services.
RBS is composed of the following components:
- RBS Client Library
An RBS client library consists of a managed library that coordinates the BLOB storage withMicrosoft SharePoint Foundation, SQL Server, and RBS provider components.
- Remote BLOB Storage provider
An RBS provider consists of a managed library and, optionally, a set of native libraries that communicate with the BLOB store.
- FILESTREAM
FILESTREAM is a feature of SQL Server 2008 that enables storage of and efficient access to BLOB data using a combination of SQL Server 2008 and the NTFS file system. For more information about FILESTREAM, see FILESTREAM Overview (http://go.microsoft.com/fwlink/?LinkID=166020&clcid=0x409) and FILESTREAM Storage in SQL Server 2008 (http://go.microsoft.com/fwlink/?LinkID=165746&clcid=0x409).
- A BLOB store
A BLOB store is an entity that is used to store BLOB data. This can be a content-addressable storage (CAS) solution, a file server that supports Server Message Block (SMB), or a SQL Server database.
For more information about RBS, see Remote BLOB Store Provider Library Implementation Specification (http://go.microsoft.com/fwlink/?LinkID=166066&clcid=0x409).
Enable FILESTREAM and provision the RBS data store
You must enable and configure FILESTREAM on the computer that is running SQL Server 2008 that hosts the SharePoint Foundation 2010 databases. To enable and configure FILESTREAM, follow the instructions in How to: Enable FILESTREAM (http://go.microsoft.com/fwlink/?LinkID=166110&clcid=0x409). After you have enabled and configured FILESTREAM, provision a BLOB store as described here.
Provision a BLOB Store
Click Start, click All Programs, click Microsoft SQL Server 2008,
and then click SQL Server Management Studio.
Expand Databases.
Select the content database for which you want to create a BLOB store, and then click New Query.
In the Query pane, copy and execute each of the following SQL queries, in the sequence provided. 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. Be aware that you can provision a BLOB store only one time. If you attempt to provision the same BLOB store more than one time, 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 RBS
You must install RBS on all Web servers and application servers in the SharePoint farm. RBS is configured separately for each associated content database.
Warning: |
|---|
| Do not install RBS by running the rbs.msi file and launching the Install SQL Remote BLOB Storage wizard. The wizard sets certain default values that are not recommended for SharePoint Foundation 2010. |
Install RBS on the database server and on the first Web server
On any Web server, go to http://go.microsoft.com/fwlink/?LinkId=177388 and download the rbs.msi file.
Click Start, click Run, type cmd into the Run text box, and then click OK.
Copy and paste the following command into the Command Prompt window. Replace WSS_Content with the database name, and replace DBInstanceName with the SQL Server instance name. You should run this command with 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.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
Install RBS on all additional Web and application servers
On a Web server, go to http://go.microsoft.com/fwlink/?LinkId=177388 and download the rbs.msi file.
Click Start, click Run, type cmd into the Run text box, and then click OK.
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
WSS_Content" DBINSTANCE="DBInstanceName
ADDLOCAL=Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer
Repeat this procedure for all Web servers and application servers.
Confirm the RBS installation
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 with a text editor and scroll towards 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”
.
On the computer that is running SQL Server 2008, verify that the RBS tables were created in the content database. Several tables should reside under the content database with names that are preceded by the letters "mssqlrbs".
Enable and test RBS
You must enable RBS on one Web server in the SharePoint farm. It does not matter which Web server you choose for this activity, as long as RBS was installed on it by using the previous procedure.
Enable RBS
On the Start menu, click Programs, click Microsoft SharePoint 2010 Products, and then click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt (that is, PS C:\>), type each of the following commands, and then press ENTER after each command. Replace <Content database name> with the content database name.
$cdb = Get-SPContentDatabase <Content database name>
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss
Test RBS data store
Connect to a document library on any Web server in the SharePoint farm.
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.
Navigate to the file list and open the file that has the most recent modified date. This should be the file that you uploaded.
Implement RBS for additional content databases
To implement RBS for additional content databases, you must perform the following procedures for each content database.
To implement RBS for additional content databases
For each additional content database, repeat the Provision a BLOB Store procedure.
On any Web server, click Start, click Run, type cmd into the Run text box, and then click OK.
Copy and paste the following command into the Command Prompt window. Replace Content database name 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 /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME=<Content database name> FILESTREAMSTORENAME=FilestreamProvider_1 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE=<DBInstanceName>>
You can confirm that RBS is working for each database by following the steps listed in Test RBS data store.
See Also