By: Omar Stewart
SharePoint 2010 has some excellent new features for managing content. In the past, working with large files has been a challenge for SharePoint. SharePoint 2010 introduces Remote Blob Storage. Remote blob storage allows streaming of your SharePoint Data to remote storage. Simply put, Remote Blob Storage allows you to work with large files in SharePoint by placing them on an external source of storage, completely transparent to the end-user. For example, you can configure a RBS to store all files greater than 100mb on an external drive.
I recently completed a great virtual lab on configuring Remote Blob Storage in 2010, I’m going to walk you through the process.
The first thing we need to do, is enable Filestreaming on the SQL Database Server.
From SQL Server Configuration Manager, Click SQL Server Services in the left panel. Right Click on your target database server and then click properties.
From the Server Properties window, click the Filestream tab.
This is where we will enable Filestreaming on the server, check the following:
-Enable FILESTREAM for Transact-SQL access
-Enable FILESTREAM for file I/O streaming access
-Allow remote clients to have streaming access to FILESTREAM data
Now that Filestreaming is enabled. We can begin to configure Filestreaming for SharePoint.
Launch SQL Server Management Studio.
Run the following query:
EXEC sp_configure filestream_access_level, 2
Leave SQL Server Management Studio open and launch the SharePoint 2010 Management Shell. If you haven’t explored the Management Shell yet…you should. It provides powerful scripts that can speed-up your SharePoint 2010 administrative tasks.
The first thing we need to do inside the shell is get the name of our content database. Management shell provides a simple set of commandlets to fetch properties of a SharePoint server. We’ll use Get-SPContentDatabase and assign it to a variable of $cdb. Enter the following command:
$cdb = Get-SPContentDatabase –WebApplication
Next, type $cdb to display the properties of our content database..
Copy the name of the content database and minimize the management shell window.
We now need to create a master key for our database, Back in SQL Server Management Studio, execute the following query, replacing [WSS_Content_GUID] with the name we copied in the previous step:
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'
Next we need to create a filegroup. Open a new query window and execute the following query, replacing [WSS_Content_GUID] with the name of our content database.
if not exists (select groupname from sysfilegroups where
add filegroup RBSFilestreamProvider contains filestream
Now that we have our filegroup, we can add our filestream file, for this example we’ll use C:\Blobstore. . Open a new query window and execute the following query, replacing [WSS_Content_GUID] with the name of our content database.
alter database [WSS_Content_GUID] add file (name =
RBSFilestreamFile, filename = 'c:\Blobstore') to filegroup
Close SQL Server Management Studio.
We’ll now install RBS. Download but DO NOT RUN the RBS installer here: http://go.microsoft.com/fwlink/?LinkID=177388
(You will have to scroll down to the bottom of the page and click the Remote Blob Store Download Link for your target platform)
We’ll drop the MSI on our C: Drive
Head back to the SharePoint management shell, navigate to C:\, and run the following command, replacing name(s) as necessary
msiexec /qn /lvx* rbs_install_log.txt /i
Replace <DatabaseServerInstanceName> With the name of your SQL Server Instance.
Examine the C:\ rbs_install_log.txt file to review the notes of the installation. At the bottom of the file (once installation is complete) you should see “Product: SQL Remote Blob Storage -- Installation completed successfully”.
Now that RBS is installed, we just need to enable the provider on our content database.
Head back to our SharePoint management shell window.
Enter $cdb to display the contents of our content database.
We now need to create a variable that will store the Remote Blob Storage settings of our content database, run the following command:
$rbss = $cdb.RemoteBlobStorageSettings
Next, run the following to display the rbss settings
$rbss | format-list
Enabled should currently be set to false.
Run the following command to install the RBS Filestream provider.
Next run the following to enable the provider, (ignore the log errors).
If you run $rbss | format-list again, enabled should now be flagged.
We can now set the active provider, Run:
If you run $rbss | format-list, you’ll notice the MinimumBlobStorageSize is set to Zero. This means that everything uploaded to the site, will get streamed to our C:\Blobstore directory. We can raise that minimum threshold so that only files larger than a specified size will be placed in our blobstore.
Run the following command:
This will set the minimum blob storage size to 1mb, if you would like to raise the threshold, you can enter any desired number.
To test RBS: Navigate to your SharePoint site, browse to any document library and upload a file larger than 1megabyte. Upon completion, browse to the blob store on your physical drive (C:\blobstore). Your uploaded file should now be in your blobstore.
While 1mb is impractical, remote blob storage can make SharePoint extremely efficient at managing much larger files. Note: If you want to upload larger files, you still have to check your upload limits from Web Application Management in Central Administration.
By: Omar Stewart