Blog Note:
There are a ton of blogs that go over different aspects of setting up RBS for SP 2010. This is the procedure that I follow for setting up RBS for a single site collection. Many of the steps and code was taken from Microsoft TechNet, MSDN and other blogs.
Overview
This article describes the steps required to configure RBS in a SharePoint 2010 environment.
Rights Requirements
- You must have the following rights to be able to successfully execute this procedure:
- You must be a local administrator on the SQL server for the Farm and on every SharePoint Server.
- You must have SA rights on the SQL server for the Farm.
- You must be a Farm Administrator for the Farm that needs RBS configured.
- You must be a Site Collection Administrator on each Site Collection you are configuring for RBS support.
Information Requirements
- You must have the following information to be able to successfully execute this procedure:
- Name(s) of the SQL server and the SharePoint server(s)
- The URL(s) of the Site Collection that you are configuring for RBS support
- The names of the content database(s) of the Site Collection that you are configuring for RBS support
Placeholders Used in this Procedure
- <CONTENT DATABASE> = The name of the SharePoint content database as it appears in the SQL Server Management Studio
- <FQDN> = The FQDN of the SharePoint Web Application
- <Task_Account> = The task account that has Farm and Site collection administrator access to run the RBS Maintainer scheduled task.
Procedure Outline
- Enable and change FILESTREAM settings on the SQL server
- Enable content database(s) to use FILESTREAM
- Install the RBS Provider on all servers
- Enable RBS on the specific web application(s)
- Enable FILESTREAM I/O access
Procedure
Enable and change FILESTREAM settings on the SQL server
- Log on to the SQL server for the Farm
- Launch the SQL Server Configuration Manager
- Right click on the MSSQLSERVER instance
- Click Properties
- Click the FILESTREAM tab
- Check Enable FILESTREAM for Transact-SQL access
- Click Apply and OK
- Launch SQL Server Management Studio
- Open a new query window
- Copy and Paste the following code:
EXEC sp_configure filestream_access_level, 2
RECONFIGURE
- Click Execute
Enable Content Database(s) to Use FILESTREAM
- Launch SQL Server Management Studio
- Open a new query window
- Copy and Paste the following code:
use [<CONTENT DATABASE>]
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' - Click Execute
- Open a new query window
- Copy and Paste the following code:
use [<CONTENT DATABASE>]
if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')
alter database [<CONTENT DATABASE>]
add filegroup RBSFilestreamProvider contains filestream - Click Execute
- Open a new query window
- Copy and Paste the following code:
use [<CONTENT DATABASE>]
alter database [<CONTENT DATABASE>]
add file (name = RBSFilestreamFile, filename = 'c:\RBS_STORE')
to filegroup RBSFilestreamProvider - Click Execute
Install the RBS Provider on all servers
- Download the RBS Provider install package from http://go.microsoft.com/fwlink/?LinkId=177388 to C:\masters on every server in the farm including the SQL server.
- NOTE: Do not run the MSI file directly!
- Change directory to c:\masters
- On the SQL Server and then the first WFE server run the following command:
msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="<CONTENT DATABASE>" DBINSTANCE="" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
- Run the following command on all other SharePoint servers:
msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi DBNAME="<CONTENT DATABASE>" DBINSTANCE="" ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer"
- Check c:\masters\rbs_install_log.txt on each server after installation:
- Search for "Installation completed successfully"
Enable RBS on the specific web application(s)
- On one of the SharePoint Farm servers
- Open the SharePoint Management Shell on run these commands:
$cdb = Get-SPContentDatabase –WebApplication http://<FQDN>
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.MinimumBlobStorageSize = 1048576
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss | Format-List
Check to see if the content database has been configured
- Launch SQL Server Management Studio
- Open a new query window
- Copy and Paste the following code:
USE [<CONTENT DATABASE>]
SELECT *
FROM dbo.DatabaseInformation
- Click Execute
- You should see two rows titled "RbsEnabled" and "RbsProvider" with values of "1" and "FilestreamProvider_1" respectively.
Enable FILESTREAM I/O access
- Log on to the SQL server for the Farm
- Launch the SQL Server Configuration Manager
- Right click on the MSSQLSERVER instance
- Click Properties
- Click the FILESTREAM tab
- Check Enable FILESTREAM for file I/O streaming access
- Check Allow remote clients to have streaming access to FILESTREAM data
- Click Apply and OK
Grant the SharePoint Application Pool Account Access to the Share and File System
- Launch Computer Manager
- Expand tree and click Shares
- Right click on MSSQLSERVER and click Properties
- Click on Share Permissions tab
- Click Add…
- Enter the SharePoint Application Pool account and click OK
- Make sure that Full Control, Change, and Read are selected and click OK
- Expand tree and click Shares
- Open Windows Explorer and navigate to the C:\ drive
- Right click on RBS_STORE and click Properties
- Click the Security tab
- Click Edit…
- Enter the SharePoint Application Pool account and click OK
- Make sure that the account has Full Control rights
- Click OK
- Right click on RBS_STORE and click Properties
Setup RBS Maintainer
Note: Ensure that the task account tsk_sp_tasks has Log on as a batch job through GPO
Note: Ensure that the task account has full control rights of the RBS share and directory
- Log on to the SharePoint SQL Content Database Server
- Launch the Windows Task Scheduler
- Click Start
- In the run field enter "Task Scheduler"
- Click Start
- Click Action
- Click Create Task…
- Enter "RBS Maintainer" in the Name field
- Select the Run whether the user is logged on or not radio button
- Click Change User or Group…
- Enter the credentials for the account <Task_Account>
- Enter "RBS Maintainer" in the Name field
- Click the Triggers tab
- Click New…
- Setup a daily task to run at 0'dark:30
- Click New…
- Click the Actions tab
- Click New…
- In the Program/script: field enter the following:
"C:\Program Files\Microsoft SQL Remote Blob Storage 10.50\Maintainer\Microsoft.Data.SqlRemoteBlobs.Maintainer.exe" -connectionstringname RBSMaintainerConnection -operation GarbageCollection ConsistencyCheck ConsistencyCheckForStores -GarbageCollectionPhases rdo -ConsistencyCheckMode r -TimeLimit 120
- Click OK
- Click Yes to the confirmation pop up
- Click OK
References:
http://technet.microsoft.com/en-us/library/ee748638.aspx
http://msdn.microsoft.com/en-us/library/cc949109(v=sql.100).aspx
http://blogs.technet.com/b/wbaer/archive/2011/02/22/filestream-and-sharepoint-2010.aspx
http://bkemmler.blogspot.com/2010/03/enable-filestream-rbs-for-sharepoint.html
http://alipka.wordpress.com/2010/06/19/how-to-disable-rbs-in-sharepoint-2010/
No comments:
Post a Comment