SharePoint RBS (Remote BLOB storag) installation, deployment, garbage collection

Source: Internet
Author: User
Tags filegroup

The example takes a SQL Server 2012 database. System Windows 2008R2 SP1.

First, enable Filesstream

Open the SQL Server 2012 Configuration tool, open SQL Server Configuration Manager, select SQL Server service, locate SQL Server (Mssqlsrever), right-click Properties, and locate the Filesstream column Operation

1. Enable the FileStream attribute of the database through SQL Server Configuration Manager. Then, set the accessibility level of the Fielstream by using the following statement:

?
12 EXECsp_configure filestream_access_level, 2 RECONFIGURE

Ii. Adding a master key for SharePoint content databases

?
1234 use [WSS_Content] if notexists (selectfromsys.symmetric_keys wherenameN‘##MS_DatabaseMasterKey##‘createmaster key encryption bypasswordN‘输入密码‘

Iii. adding FileStream filegroups and files to the content database

?
1234567 use [WSS_Content] if notexists (selectgroupname fromsysfilegroups wheregroupname=N‘RBSFilestreamProvider‘alterdatabase[WSS_Content] addfilegroup RBSFilestreamProvider containsfilestreamuse [WSS_Content] alterdatabase [WSS_Content] addfile (name= RBSFilestreamFile, filename = ‘c:\blobstore‘tofilegroup RBSFilestreamProvider

Iv. installation of RBS

1, can be directly executed Rbs_x64.msi file to install the program, the official download SQL Server2013 Rbs.msi

Check if the installation was successful by using the following statement

SELECT * from dbo.sysobjects where name like ' rbs% '

Five enable RBS

$CDB = get-spcontentdatabase "WSS_Content"

$RBSS = $cdb. Remoteblobstoragesettings
$rbss. Installed ()
$rbss. Enable ()
$pvdName = $rbss. Getprovidernames () [0]
$rbss. Setactiveprovidername ($pvdName)

$rbss. Migrate ()//This command can migrate blobs in the SharePoint content database to the file system

$rbss. Minimumblobstoragesize = 1048000//The command is used to set the minimum file value that is stored in the file system and is saved in the database as usual when the file is smaller than the value.

$cdb. Update ()

Vi. garbage collection mechanism

This article has been very well said, you can click to read

I emphasize several points:

    1. Usually we delete the document, not really deleted, but saved in the SharePoint Recycle Bin, the Recycle Bin has two layers, the first layer is the user operation, can be deleted or restored, and the PC computer, the second layer is the site collection Recycle Bin, generally need to be an administrator to operate, after this layer is deleted, The file cannot be restored through SharePoint.

    2. Garbage collection is a slow process that can be judged by the size of the folder in which files are stored at intervals.

Vii. Uninstalling RMS

1. Uninstall in SharePoint

$CDB =get-spcontentdatabase <ContentDbName>

$rbs = $cdb. Remoteblobstoragesettings

$rbs. Getprovidernames ()

$rbs. Setactiveprovidername ("")

$rbs. Migrate ()

$rbs. Disable ()

2. Run cmd in administrator mode, start recycle

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

3. Click Rbs.msi Install file to uninstall RBS

4. Delete the RBS in the database

EXEC mssqlrbs.rbs_sp_uninstall_rbs 0

ALTER 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")

Now you can delete files and file stream filegroup:

ALTER DATABASE yourdbname Remove file rbsfilestreamfile;

ALTER DATABASE yourdbname REMOVE FILEGROUP rbsfilestreamprovider;

SharePoint RBS (Remote BLOB storag) installation, deployment, garbage collection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.