Configuring RBS for SP2010

Following on from my previous post about list scaling and performance.  The following posts details configuration of Remote Blob Storage for SharePoint 2010 and SQL Server 2008 R2.

First download the RBS provider for SQL Server 2008 (don’t install it yet):

http://go.microsoft.com/fwlink/?LinkId=177388

Configure file stream for the SQL Server Service using the Configuration Manager:

image

Execute the following SQL queries:

EXEC sp_configure filestream_access_level, 2

RECONFIGURE

Execute the following SQL to set up a master encryption key and blob store file group:

use WSS_Content

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'

if not exists (select groupname from sysfilegroups where 
groupname=N'RBSFilestreamProvider')alter database WSS_Content
 add filegroup RBSFilestreamProvider contains filestream
 
alter database [WSS_Content] add file (name = RBSFilestreamFile, filename = 'c:Blobstore') 
to filegroup RBSFilestreamProvider

Install the RBS provider with the following command (change DBINSTANCE to your SQL server instance):

msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="SP2010" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1

If installing RBD on production servers, be sure to run on all WFE’s with the following command (again, change the DBINSTANCE):

msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi DBNAME="WSS_Content" DBINSTANCE="SP2010" ADDLOCAL=”Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer”

Run the following Power Shell script from the SP2010 Management Console:

$cdb = Get-SPContentDatabase –WebApplication http://sp2010

$rbss = $cdb.RemoteBlobStorageSettings

$rbss.Installed()

$rbss.Enable()

$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])

$rbss

Now create a document library in SharePoint and upload an image to it.  Next visit the c:blobstore directory and look for the GUID sub folder with recent date.  Keep drilling down until you find a file.  You should see a file with GUID name.  Drop this into IE and you should see that it is the same file you uploaded to your document library.

 

From the SharePoint 2010 book I’m reviewing

10 thoughts on “Configuring RBS for SP2010

  1. Deavon M. McCaffery

    Hey there:

    I am having issues with RBS.

    Everything described above worked perfectly, in that the RBS log file reports a successful installation and the additional tables were added to the content database in SQL Server.

    However, the PowerShell script only seemingly works. I have narrowed it down to the following call:

    $rbss.GetProviderNames()

    This call returns nothing, which I assume means that the RBS Filestream Provider was not correctly configured.

    Scanning the RBS log, I can’t find any reported errors or failures anywhere. Do you think you might know how/when/why the array driving the GetProviderNames() method is populated?

    MSDN has the entire SPRemoteBlobStorageSettings object marked as “Internal Use Only.” so no help can be found there.

    Any information you can provide would be greatly appreciated.

    Thanks!

    DMM

  2. Deavon M. McCaffery

    Nevermind!

    The issue had to do with an entry in the mssqlrbs_resources.rbs_internal_blob_stores table not being created for some very strange reason. Oddly enough, the log file did not report anything related to this omission.

    I was able to get it working by uninstalling RBS, removing the RBS Provider File group from SQL, deleting the mssqlrbs tables, and rebuilding the RBSFilestreamProvider in the PRIMARY filegroup.

    I then reinstalled RBS and all is well.

    Cheers!

    DMM

  3. Pingback: howto://upload large files to sharepoint 2010

  4. HelpDaz

    I have Sharepoint 2010 running on Server 2008 R2 and SQL 2008 R2

    I am able to run through the article up until the point of confirming the RBS installation. All of my log files seem very happy, containing no obvious errors, and finishing with Product: SQL Remote Blob Storage – Installation completed successfully.

    At this point I check my Content DB to find that no RBS tables have been created. I have tried running the install with an account Farm level permissions but have still had no joy.

    Has anybody else had a similar experience. I have spent a long time troubleshooting but can see no obvious mistakes. I can provide my log files if anybody would like to take a look through?

    I have enabled Named Pipes in Server Configuration Manager as this was disabled. I have also checked my DBInstance as I had changed this from MSSQLSERVER. I have now set it back to the default of MSSQLSERVER. I have created a new content database and in turn a new blob store for each change I have tested.

    Is there anything else that can be suggested? Is there any more detail I can provide here to help troubleshoot this problem?

    Hope to hear back soon! Many thanks!

  5. Help Daz

    I have Sharepoint 2010 running on Server 2008 R2 and SQL 2008 R2

    I am able to run through the TechNet article, http://technet.microsoft.com/en-us/library/ee748631.aspx, up until the point or Confirming the RBS installation. All of my log files seem very happy, containing no obvious errors, and finishing with Product: SQL Remote Blob Storage – Installation completed successfully.

    At this point I check my Content DB to find that no RBS tables have been created. I have tried running the install with an account Farm level permissions but have still had no joy.

    Has anybody else had a similar experience. I have spent a long time troubleshooting but can see no obvious mistakes. I can provide my log files if anybody would like to take a look through?

    I have enabled Named Pipes in Server Configuration Manager as this was disabled. I have also checked my DBInstance as I had changed this from MSSQLSERVER. I have now set it back to the default of MSSQLSERVER. I have created a new content database and in turn a new blob store for each change I have tested.

    Is there anything else that can be suggested? Is there any more detail I can provide here to help troubleshoot this problem?

    Many thanks

    **UPDATE**

    I have just uninstalled RBS from my DB Server to start the install from scratch. I now find that when running the command to install RBS;

    msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME=”WSS_Content_Media1″ DBINSTANCE=”MSSQLSERVER” FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1

    I see this error on 2 occasions in the log file, This error only appears the first time that the command is run;

    MSI (s) (54:E4) [11:30:01:444]: Executing op: ActionStart(Name=RunFSSetupScripts,,)
    Remote Blob Storage on the database has failed with error message:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)
    Setup will continue the installation.

    MSI (s) (54:E4) [11:30:17:607]: Executing op: ActionStart(Name=ParseFilestreamConfigFile,,)
    Installing the FILESTREAM blob store failed with error message:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)
    Setup will continue the installation.

    Earlier in the log file I see this message, this one appears each time the command is run;

    MSI (s) (54:E4) [11:29:27:554]: Executing op: ActionStart(Name=ProcessComponents,Description=Updating component registration,)
    Info 2769. The installer has encountered an unexpected error. The error code is 2769. Custom Action CreateFilesNoUI did not close 21 MSIHANDLEs.

    Any assistance would be appreciated.

    Many thanks

  6. Help Daz

    I now have working RBS.

    I uninstalled RBS from my DB server. Reinstalled using a DBInstance name of ‘mydbserver’ and now tables have created!

    I have now however hit a storage solution problem. I ideally want to be able to save my blob store to a NAS using UNC… This is to make sure that my storage solution is as efficient as possible rather than having to provision a large lun to a raw device mapping on my virtual db server. This would mean large backups of the lun for any minor change to data with no option of granular restore.

    MS Filestream provider doesnt seem to allow this. I am looking into NetApp Snapmanager for Sharepoint now as we use NetApp storage solutions.

    Does anybody have any good or bad experiences of user any third party tools to manage blob stores on UNC paths?

    Thanks

  7. Andy

    @Help Daz

    Hello,

    change the line of the alter command to:

    use [ContentDbName]
    alter database [ContentDbName] add file (name = RBSFilestreamFile, filename = ‘DRIVE:BLOBSTORENAME’) to filegroup RBSFilestreamProvider

    and you are good to go on another drive 😀

    Greetings!

  8. Maryam

    Hello every body

    I have succesfully installed RBS on SQL Server 2008 r2 , everything is ok here except uploading file in blobstore.
    it is not created any file since I add document in shared document in central administrator sharepoint 2010.
    Would you please help me

    Thank you very much
    Maryam

Comments are closed.