在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

1.介绍

在SharePoint中你站点中的所有文件都是存在于内容数据库中的,比如列表中的Item,文档库中的文档。有很多时候在文档库中我们很多很大的文件,这个时候就会导致我们的内容数据库变得很大,而且增长的速度很快,我们这个时候希望这些文档能存在文件系统中,使用RBS就可以做到这点。

SQL Server 2008推出了两个用于存储BLOB数据的新功能:

  · FILESTREAM:是一个你可以在varbinary字段上设置的属性,以便数据存储在文件系统中(因此受益于它的快速流式功能和存储能力)但是直接在数据库的上下文中管理和访问。:

  · 远程BLOB存储:一个客户端应用程序编程接口(API),它降低了建立依赖于一个用于BLOB的外部存储和一个用于关系数据的数据库的应用程序的复杂性。

关于RBS这里有一篇PPThttp://www.docin.com/p-37773363.html。下面是具体配置的截图,请大家参考,如果对你有帮助请推荐下。

2.Enable FILESTREAM and Provision the RBS Data Store
在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

打开sql server,查询分析器中执行下面sql语句

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

通过下面powershell得到content db名字

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

执行下面脚本

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

执行下面脚本

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

执行下面脚本 ,将RBSFilestream 添加到RBSFilestreamProvider 文件组中. 

use WSS_Content_e58f8446cde041318a305696f040d32a

alter database WSS_Content_e58f8446cde041318a305696f040d32a

add file (name = RBSFilestreamFile,

filename = 'c:\Blobstore')

to filegroup RBSFilestreamProvider

下面设置为Full Access

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

3.Install the RBS FILESTREAM Provider

Powershell中执行下面命令

PS C:\Users\Administrator> cd\

PS C:\> msiexec /qn /lvx* rbs_install_log.txt /i C:\ITPRO\RBS\RBSInstall\RBS.msi

TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content_e58f8446cde04

1318a305696f040d32a" DBINSTANCE="DEMO2010A" FILESTREAMFILEGROUP=RBSFilestreamPro

vider FILESTREAMSTORENAME=FilestreamProvider_1

打开c盘 rbs.install_log.txt文件,大小有1300kb左右,看到下面信息说明安装成功

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

4.Enable the Provider on a Content Database

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

This command($RBSS.Enable()) enables the RBS FILESTREAM Provider. Note the Default configuration is used for the ConsoleLog, FileLog, CircularLog, EventViewerLog and DatabaseTableLog.

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

执行下面脚本

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

再次查看如下:

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

我们去文档库中上传一个文档

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

在c盘我们设置的位置,会有一个和你上传文件size大小一样的文件,如下图

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

5.Configure the RBS FILESTREAM Provider

使用这种方式有性能影响的,所以小的文件我们没有必要使用该方式,直接存储到sharepoint content db中就可以,我们可以进行下面配置,设置为1Mb:

在SharePoint 2010 中配置Remote Blob Storage FILESTREAM Provider

 

本文转自Justin博客园博客,原文链接:http://www.cnblogs.com/carysun/archive/2010/12/28/mossrbs.html,如需转载请自行联系原作者