广州服装 网站建设,12306网站谁做的,温州瓯海区营销型网站建设,猪八戒兼职网官网SharePoint 承担着文件管理的工作#xff0c;默认都是将它们以BLOB的数据形式存储在内容数据库当中#xff1b;当文件大时#xff0c;就很容易导致数据库容量被这些BLOB数据所快速消耗#xff0c;而且频繁地对这些大数据量的BLOB数据进行读写访问#xff0c;很容易在SQL端…SharePoint 承担着文件管理的工作默认都是将它们以BLOB的数据形式存储在内容数据库当中当文件大时就很容易导致数据库容量被这些BLOB数据所快速消耗而且频繁地对这些大数据量的BLOB数据进行读写访问很容易在SQL端造成性能瓶颈。 继MOSS2007之后SharePoint2010和2013可以使用SQL Server 2008及其以上版本提供的Remote Blob Storage (RBS) 这一新特性可以将BLOB数据存储在文件系统当中或者是存储在其他专门用于存储BLOB数据的服务器上面。
示例采用sql server 2012 数据库。系统 windows 2008R2 SP1 。
启用FilesStream打开Sql server 2012 的“配置工具”然后打开“Sql Server 配置管理器”,选择“Sql Server 服务”找到“SQL Server (MSSQLSREVER)”,右击“属性”找到“FILESSTREAM”栏操作如图通过SQL Server Configuration Manager启用数据库的FileStream特性。然后通过以下语句设置fielstream的可访问级别 EXEC sp_configure filestream_access_level, 2
RECONFIGURE 为SharePoint的内容数据库加增加主密钥 use [WSS_Content]
if not exists (select * from sys.symmetric_keys where name
N##MS_DatabaseMasterKey##) create master key encryption by password
N输入密码 为该内容数据库增加FILESTREAM文件组和文件 use [WSS_Content]
if not exists (select groupname from sysfilegroups where
groupnameNRBSFilestreamProvider) 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 安装RBS可通过直接执行RBS_X64.msi文件来安装程序官方下载Sql Server2013 RBS.msi通过下面语句检查是否安装成功select * from dbo.sysobjects where name like rbs% 启用RBS $cdb Get-SPContentDatabase WSS_Content$rbss $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$pvdName $rbss.GetProviderNames()[0]
$rbss.SetActiveProviderName($pvdName)$rbss.Migrate()//该命令可以将SharePoint内容数据库中原有的BLOB迁移到文件系统中$rbss.MinimumBlobStorageSize 1048000 //该命令用于设置存于文件系统中的文件最小值当文件小于该值的时候将还是照常保存在数据库中。$cdb.Update() 垃圾回收机制 这篇文章已经说得很好了可以点击阅读 我强调几点 通常我们删除文档并非真的删除而是保存在SharePoint回收站里回收站有两层一层是用户操作可以删除或者还原跟PC 电脑差不多第二层是网站集回收站一般需要管理员才能操作这层删除后文件就不能通过sharepoint 还原了。 垃圾回收是一个持续缓慢的过程可以隔段时间查看存放文件的文件夹大小来判断。 卸载RMS SharePoint中卸载 $cdbGet-SPContentDatabase ContentDbName$rbs$cdb.RemoteBlobStorageSettings$rbs.GetProviderNames()$rbs.SetActiveProviderName()$rbs.Migrate()$rbs.Disable() 管理员方式运行CMD启动回收 C:\Program Files\Microsoft SQL Remote Blob Storage 11.0\Maintainer\Microsoft.Data.SqlRemoteBlobs.Maintainer.exe -connectionstringname RBSMaintainerConnection -operation GarbageCollection ConsistencyCheck ConsistencyCheckForStores -GarbageCollectionPhases rdo -ConsistencyCheckMode r -TimeLimit 120 点击RBS.msi安装文件以卸载RBS在数据库中删除RBS exec mssqlrbs.rbs_sp_uninstall_rbs 0ALTER TABLE [mssqlrbs_filestream_data_1].[rbs_filestream_configuration] DROP column [filestream_value]ALTER TABLE [mssqlrbs_filestream_data_1].[rbs_filestream_configuration] SET (FILESTREAM_ON NULL) 现在你可以删除文件和文件流filegroup: ALTER DATABASE yourdbname Remove file RBSFilestreamFile;ALTER DATABASE yourdbname REMOVE FILEGROUP RBSFilestreamProvider;
Some question about RMB :
QUS:I have other web servers, app servers and db servers, do i need to install the rbs.msi exe on every other server in the farm , or just only the web servers and the app servers. Such as do we run that msiexec command on each server. ANS: Best recommend is to install on all the servers
QUS:Also how does rbs work for all migrated sites or existing sites which have documents already stored. So if we enable rbs for these sites and for files over 5 mb, would that apply to only new uploaded files over 5mb, or will apply to also already stored over 5mb files. ANS: For newly created docs no issue, docs over 5MB would automatically move For previous docs, run below commands once you set the minimum blob storage $cdb Get-SPContentDatabase –WebApplication URL $rbss $cdb.RemoteBlobStorageSettings $rbss.Migrate()
QUS:Also does shredded storage impact the files sizes been uploaded as while, such if we configure files to be uploaded over 5 mb, will this apply to the files over this limit or does the files have to be much larger than 5 MB, such 8 or 9 mb have the rbs applied to them. https://blogs.technet.microsoft.com/pramodbalusu/2011/07/08/rbs-and-sharepoint-2010/