Updated: 2010-02-04
[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) and the FILESTREAM provider on a Microsoft SQL Server 2008 database server that supports a Microsoft SharePoint Foundation 2010 system.
RBS is a library API set that is incorporated as an add-on feature pack for Microsoft SQL Server 2008 and Microsoft SQL Server 2008 Express. RBS is designed to move the storage of binary large objects (BLOBs) from database servers to commodity storage solutions. RBS ships with the RBS FILESTREAM provider, which uses the RBS APIs to store BLOBs. For more information about RBS, see Overview of Remote BLOB Storage (SharePoint Foundation 2010).
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 SQL Server 2008 Express or SQL Server 2008.
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_X64.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=165839&clcid=0x409 (http://go.microsoft.com/fwlink/?LinkID=165839&clcid=0x409) and download the RBS_X64.msi file.
-
Click Start and then type command prompt into the text box. In the list of results, right-click Command Prompt, and then click Run as administrator. Click OK.
-
Copy and paste the following command into the Command Prompt window. You should run this command with the specific database name and SQL Server instance name one time only. The operation should complete in approximately one minute.
msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
Where:
-
WSS_Content is the database name
-
DBInstanceName is the SQL Server instance name
Install RBS on all additional Web and application servers
-
On a Web server, go to http://go.microsoft.com/fwlink/?LinkID=165839&clcid=0x409 (http://go.microsoft.com/fwlink/?LinkID=165839&clcid=0x409) and download the RBS_X64.msi file.
-
Click Start and then type command prompt into the text box. In the list of results, right-click Command Prompt, and then click Run as administrator. 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_X64.msi DBNAME="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_X64.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, type each of the following commands. Replace http://sitename with the Web application that is connected to the content database.
$cdb = Get-SPContentDatabase –WebApplication http://sitename
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss
Test RBS data 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 have enabled RBS, and then click New Query.
-
Navigate to the RBS data store directory.
-
Navigate to the file list and open the folder that has the most recent modified date (other than $FSLOG). Within that folder, open the file that has the most recent modified date. This should be the file that you uploaded.
To enable additional databases to use RBS, see Set a content database to use Remote Blob Storage (RBS) (SharePoint Foundation 2010).