Configuring Remote Blob Storage on SharePoint

Since recently upgrading to SQL Server 2008 R2, we decided to do some testing with the newfeature called Remote Blog Storage. This new feature allows files to be storedlocally on disk if it exceeds a specified size, thereby reducing the size ofSharePoint content databases.

There areseveral resources on the net that provide a step by step guide on how toconfigure RBS. However, no one guide worked completely for me. Hence, I decidedto write by own guide by pulling the stuff that worked for me from severalguides

  • You will need:
  1. SharePoint 2010
  2. SQL Server 2008 R2
  3. RBS Client (http://go.microsoft.com/fwlink/?LinkID=165839&clcid=0x409)

 

  • Process

This is a high level break down of what youneed to do to enable Remote Blob Storage on SharePoint 2010.

  1. Enable FILESTREAM on the target SQL Server Instance.
  2. Provision the RBS Data Store.
  3. Install the Microsoft SQL Server 2008 R2 Remote Blob Store
  4. Enable Remote Blob Storage
  5. Configure Minimum Blob Storage Size
  6. Test the RBS Data Store

 

Enablethe FILESTREAM on the target SQL Server Instance.

Run SQL Server Configuration Manager and select your target SQLServer Instance.

Right click -> Properties -> FILESTREAM and check all theboxes as shown below.

 

Provisionthe RBS Data Store

Here we run a number of SQL statements in SQL Server ManagementStudio to provision the RBS Data Store.

 

EXEC sp_configurefilestream_access_level, 2
RECONFIGURE

 

For the following statements, replaceWSS_Content with the name of your database and c:\Blobstore with the locationand name of your blob store.

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 the Microsoft SQL Server 2008 R2 Remote Blob Store

Download the RBS Client and copy it to all your web front end servers(WFE).

On the first WFE, open CommandPrompt with ‘Run as Administrator‘. For each of the following msiexec commands, replace WSS_Contentwith your database name and DBInstanceName with the name of your databaseinstance, e.g. vm100 or vm100\sharepoint.

Navigate to where youdownloaded the RBS_X64.msi file and type the following command:

msiexec /qn/lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=trueFILEGROUP=PRIMARY DBNAME="WSS_Content"DBINSTANCE="DBInstanceName" FILESTREAMFILEGROUP=RBSFilestreamProviderFILESTREAMSTORENAME=FilestreamProvider_1

Open the rbs_install_log.txt file and look for the line:

Product: SQL Remote Blob Storage --Configuration completed successfully

 

The log file should be more than 1 MB if theconfiguration was successful.

On the database server, runthe following query in SQL Server Management Studio to check if the RBS tables have been created.

use WSS_Content
select * from dbo.sysobjects
where name like 'rbs%'

 

You should see something like the following inthe results panel.

 

For additional Web servers, do the same as above but run thefollowing msiexec command instead:

msiexec /qn /lvx*rbs_install_log.txt /i RBS_x64.msi DBNAME=WSS_ContentDBINSTANCE=DBInstanceNameADDLOCAL=Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer

 

EnableRemote Blob Storage

Note: You will need to performthe steps below for each content database.

On your Web Front end server, open SharePoint 2010 ManagementShell and type in the following commands in sequence, replacing WSS_Contentwith the name of your database:

 

$cdb =Get-SPContentDatabase WSS_Content

$rbss =$cdb.RemoteBlobStorageSettings $rbss.Installed()

$rbss.Enable()

$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])

$rbss

 

With the last command you should see the following result:

If not, it is most likely that the RBS Client has not installedcorrectly. Go through the rbs_install_log.txt and search for errors.

 

ConfigureMinimum Blob Storage Size

You may want to configure th e minimum blob storage size. Thismeans that any file that exceeds this configured size will go straight to theblob store on the file system.

On any WFE, open SharePoint 2010 Management Shell and type the following commands, again replacing WSS_Content withthe name of your database:

 

$database =Get-SPContentDatabaseWSS_Content
$database.RemoteBlobStorageSettings.MinimumBlobStorageSize=1048576
$database.Update()

 

This will set the minimum sizeof your blob store to 1MB.

Testthe RBS Data Store

If you provisioned a new database to test your blob store, youwill need to create a site collection in that database. I prefer to usePowerShell to do any site creations as it lets me specify the database I wishto create in. Otherwise,  if you do it via Central Administration, youhave to set all your other database to read-only so that your site creates inthat specific database.

Open SharePoint 2010 Management Shell and type the followingcommand:

 

New-SPSite-url <your sharepoint site collection> -owneralias <account name>-contentdatabase <blob database>

Note: you haveto define a managed path first before you run the above command.

Once your sitehas been created, upload a file that is greater than the minimum blog storagesize you specified in the previous step.

Now, browse tothe location of your blob store, e.g. c:\Blobstore

You will see that your file has been copied directly to the blobstore.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值