Configuring BLOB storage in SharePoint2010
With Sharepoint 2010, the Remote
Blob Storage (RBS) functionality, which allows putting documents into
the database filesystem instead of the database itself, came into focus
again. To make that happen each content database is located in a
specific section of the file system where all the documents are stored.
This documents are none the less managed by Sharepoint, a database is
mandatory even if the documents are stored as BLOB because metadata is
written exclusively into databases.
The following installation routines and steps to activate RBS are based on Technet and the blogs of Jie Li and Todd Klindts.
All the following installations have been done on Microsoft Windows Server 2008 R2 and Microsoft SQL Server 2008 R2 as there is no support for RBS on Microsoft SQL Server 2005.
First of all we have to activate FILESTREAM on the SQL instance that you want to put to the BLOB.
- Connect to SQL Server
Start –> All Programs –> Microsoft SQL Server 2008 R2 –> Configuration Tools –> SQL Server Configurations Manager - In the Services list, click “SQL Server Services”
- Choose your SQL instance (here “SQL Server (MSSQLSERVER)”) and right click Properties.
- Switch to the FILESTREAM tab and check all the available checkboxes
- Click Apply –> OK
- Now start SQL Server Management Studio
Start –> All Programs –> Microsoft SQL Server 2008 R2 –>SQL Server Management Studio - Open a query windows and start the following SQL statement
For easier reference, just copy the text below
EXEC sp_configure filestream_access_level, 2
RECONFIGURE
All further steps requires SharePoint to be installed properly and that a WebApplication has already been created. The Content Database in this case I created by Powershell:
- Connect to a Front End Server Start –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell Create a Content Database
For easier reference, just copy the text below
New-SPContentDatabase –name WSS_Content_Blob_001 –WebApplication http://sp2010 –MaxSiteCount 1 –WarningSiteCount 0
- Connect to your SQL Server
Start –> All Programs –> Microsoft SQL Server 2008 R2 –>SQL Server Management Studio
use [WSS_Content_Blob_001]
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_Blob_001]
if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database [WSS_Content_Blob_001] add filegroup RBSFilestreamProvider contains filestream
use [WSS_Content_Blob_001]
alter database [WSS_Content_Blob_001] add file (name = RBSFilestreamFile, filename = 'c:\Blob_001') to filegroup RBSFilestreamProvider
Now the direcory for the Blobstore has been created in “C:\Blob_001”
Next you have to download the EXE for RBS, and it has to be copied to each Web Frontend Server. During all the following steps mind checking the log files for errors.
- Connect to the Web Front End hosting the Central Admin Console
- Open a Command Prompt (IMPORTANT -> run with elevated permissions)
- Change to the directory containing the previously downloaded RBS_X64.exe
- Delete or rename a already existing „rbs_install_log.txt“ if applicable.
- Run the follwoing command, replace
DBNAME with your content database and DBINSTANCE with your SQL
instance. Mind that this command only works once, if you want to
configure a second database, chose the option “Configure additional database” (see below).
msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content_Blob_001" DBINSTANCE="DC" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
- After this process has completed
(it may take a minute or two, the log reads “Verbose Logging stopped”),
check the “rbs_install_log.txt” if it contains the following line of
text (it should be approximately 21 lines before the end of the file:
"Product: SQL Remote Blob Storage -- Configuration completed successfully"
If that is not the case you have an issue. Check the following:
- Are you in the right directory
- Did you make a typo
- Did you run the prompt with elevated privileges - If you have more than one WFE in your farm, you now have to change to the other servers and run the following command:
For easier reference, just copy the text below
msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi DBNAME="WSS_Content_Blob_001" DBINSTANCE="DC" ADDLOCAL="Client,Docs,Maintainer, ,FilestreamClient,FilestreamServer"
- Check the “rbs_install_log.txt” if
it contains the following line of text (it should be approximately 21
lines before the end of the file:
"Product: SQL Remote Blob Storage -- Configuration completed successfully"
- Execute all steps from step 7 on every additional WFE. This is mandatory, otherwise problems might occur.
- Connect to SQL Server
Start –> All Programs –> Microsoft SQL Server 2008 R2 –>SQL Server Management Studio - Execute the following query
For easier reference, just copy the text below
use WSS_Content_Blob_001
select * from dbo.sysobjects
where name like ‘rbs%’
As one last step you have to tell Sharepoint that the content database uses RBS. To do that you have to execute the following command:
- Connect to WFE
Start –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell - Execute the following commands in sequence:
For easier reference, just copy the text below
$cdb = Get-SPContentDatabase WSS_Content_Blob_001
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss
- Connect to WFE
Start –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Central Administration - Application Management – Manage Content Databases
- Choose the applicable Web Application
- Configure the Content Database to put the next site collection to “WSS_Content_Blob_001”
– If you have multiple databases, set “Maximum Number of Site Collections” to the current value
– “WSS_Content_Blob_001” should not contain any site collections - Go back to the main site of Central Administration
- Application Management – Create Site Collection
- Enter all the required data
- OK - As soon as the site collection creation is finished, all newly uploaded documents should be created in the filesystem.
Notice:
Documents below 100 kB will not be put to the file system but will be stored in the database.Configure additional content databases:
If you want to configure more than one content database for RBS, all the steps above have to be executed. The only difference is the command in step 5. This one dies not work, and no RBS tables are created. Therefore use the command below:msiexec /qn /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME=WSS_Content_Blob_002 FILESTREAMSTORENAME=FilestreamProvider_1 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE=CD
No comments:
Post a Comment