Total Pageviews

Search This Blog

Wednesday, December 19, 2012

Configuring and Implementing Sharepoint 2010 RBS (Remote Blob Storage) with SQL Server 2012 - Part 2

Good day Friends!

A while ago, I blogged on Configuring and Implementing Sharepoint 2010 RBS (Remote Blob Storage) with SQL Server 2012 - Part 1

In Part1, I gave an introduction on RBS, Benefits of implementing RBS in your enterprise, Installing the required components of RBS, Configuring and Setting up RBS for Sharepoint Content database.

In this post, I will try and cover the steps involved in Enabling RBS on a Second content database, Troubleshooting RBS, General Links and References and finally how it can be a part of your enterprise (along with Dynamics AX ERP)

A. Enabling RBS on a Second Content database

While enabling RBS for a second content database, Follow the similar steps which I mentioned in Part 1 except for the msiexec part, run the following command:

msiexec /qn /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME=WSS_Content_IntranetBlob FILESTREAMSTORENAME=FilestreamProvider_1 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE=CD

Finally we need to run this Powershell Script to activate RBS on Second content database

            $cdb = Get-SPContentDatabase –WebApplication  <URL>
            $rbss = $cdb.RemoteBlobStorageSettings
            $rbss.Installed()
            $rbss.Enable()
            $rbss.SetActiveProviderName($rbss.GetProviderNames()[0])


B. Troubleshooting


Error# 1
Initially, for testing purpose I installed and configured RBS with Sharepoint Foundation 2010 on one of my test vm's, Everything went well but when I try to upload a document, it throws the below exception:

Exception: Microsoft.Data.SqlRemoteBlobs.BlobStoreException: There was a generic database error.

Solution:

Tried completely uninstalling RBS from Sharepoint Foundation and re-configured once again the Content database for RBS but still no luck :(.

Then I turned on to my ultimate weapon ;-) SQL profiler to identify the queries running behind the scenes whilst uploading a document to sharepoint library.

As usual, SQL Profiler didn’t let me down and it showed me the stored proc which was getting executed:

exec [mssqlrbs_filestream].[rbs_fs_sp_initialize] @schema_suffix=N'1',@filegroup_name=N'RBSFileStreamProvider',@data_filegroup_name=N'PRIMARY',@allow_remote=0,@schema_version=@p5 output,@share_prefix=@p6 output

I copied this statement from the Profiler and opened a new query window via SSMS and fired the query and I got the same error, I debugged the stored proc and found that the stored proc definition just took 3 input parameters, while sharepoint was sending 4 parameters, modified the stored proc to cater for @allow_remote parameter and that did the trick!!! :). Not a pretty way to fix it up, but I guess this would be a bug with Foundation 2010 version running on my VM.

C. References

Thought to post some useful links/references which can be handy while configuring RBS:

http://technet.microsoft.com/en-us/library/ee748631%28v=office.14%29.aspx
http://blogs.technet.com/b/pramodbalusu/archive/2011/07/09/rbs-and-sharepoint-2010.aspx
http://stevemannspath.blogspot.com.au/2012/07/bang-two-pound-four-remote-blob-storage.html
http://sharepoint.nauplius.net/2011/03/enabling-rbs-on-multiple-content.html
http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=174
 

D. Conclusion

To summarize, I believe RBS is the answer if you want to externalize your storage rather than cluttering your database and even this concept can be extended to Microsoft Dynamics AX (Document Management) wherein we end up storing huge BLOB type data in SQL.

1 comment:

Unknown said...


My cousin recommended this blog and she was totally right keep up the fantastic work!
Sharepoint Remote Blob Storage