Jan 11, 2012

Remove Remote BLOB Storage (RBS) from a SharePoint 2010 Environment


Blog Note:
This is a companion article to my post titled: Remove Remote BLOB Storage (RBS) from a SharePoint 2010 Environment

NOTE: This solution has never been tested. This has been purely developed based on research.
Overview
This article describes the steps required to configure RBS in a SharePoint 2010 environment.
Rights Requirements


  • You must have the following rights to be able to successfully execute this procedure:
  • You must be a local administrator on the SQL server for the Farm and on every SharePoint Server.
  • You must have SA rights on the SQL server for the Farm.
  • You must be a Farm Administrator for the Farm that needs RBS configured.
  • You must be a Site Collection Administrator on each Site Collection you are configuring for RBS support.
Information Requirements
  • You must have the following information to be able to successfully execute this procedure:
  • Name(s) of the SQL server and the SharePoint server(s)
  • The URL(s) of the Site Collection that you are configuring for RBS support
  • The names of the content database(s) of the Site Collection that you are configuring for RBS support
Placeholders Used in this Procedure
  • <CONTENT DATABASE> = The name of the SharePoint content database as it appears in the SQL Server Management Studio
  • <FQDN> = The FQDN of the SharePoint Web Application
Procedure Outline
  1. Migrate all content off RBS to SQL and disable RBS for the content database.
  2. Change the default RBS garbage collection windows to 0 on the content database.
  3. Disable the RBS Maintainer Task
  4. Run the RBS Maintainer
  5. Uninstall RBS
  6. Disable FILESTREAM on the SQL server.
Procedure
Migrate all Content off RBS to SQL and Disable RBS for the Content Database
  1. Log on to a SharePoint Web Front End
  2. Launch a SharePoint 2010 Management Shell
  3. Run the following code:
    $cdb=Get-SPContentDatabase <ContentDbName>
    $rbs=$cdb.RemoteBlobStorageSettings
    $rbs.GetProviderNames()
    $rbs.SetActiveProviderName("")
    $rbs.Migrate()
    $rbs.Disable()
Note: This might take some time depending on amount of data in your RBS store.
Change the Default RBS Garbage Collection Windows to 0 on the Content Database
  1. Log on the SharePoint Content SQL Database Server.
  2. Launch a command prompt
  3. Run the following commands:
    exec mssqlrbs.rbs_sp_set_config_value 'garbage_collection_time_window','time 00:00:00′
    exec mssqlrbs.rbs_sp_set_config_value 'delete_scan_period','time 00:00:00′
Disable the RBS Maintainer Task
  1. Launch the Windows Task Scheduler
  2. Click Start
  3. In the run field enter "Task Scheduler"
  4. Right click on the RBS Maintainer task and click Disable
Run the RBS Maintainer
  1. Open a command prompt
  2. Run the following command:
    "C:\Program Files\Microsoft SQL Remote Blob Storage 10.50\Maintainer\Microsoft.Data.SqlRemoteBlobs.Maintainer.exe" -connectionstringname RBSMaintainerConnection -operation GarbageCollection ConsistencyCheck ConsistencyCheckForStores -GarbageCollectionPhases rdo -ConsistencyCheckMode r -TimeLimit 120
Uninstall RBS
  1. Run c:\masters\rbs.msi
  2. Walk through the wizard selecting the Remove option.
Disable FILESTREAM on the SQL server.
  1. Launch the SQL Server Management Studio
  2. Open a new query window
  3. Run the following script:
    use [<CONTENT DATABASE>]
    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")
  4. Open a new Query window
  5. Run the following script:
    ALTER DATABASE [<CONTENT DATABASE>] Remove file RBSFilestreamFile;
    ALTER DATABASE [<CONTENT DATABASE>] REMOVE FILEGROUP RBSFilestreamProvider;
  6. Launch the SQL Server Configuration Manager
  7. Right Click on the SQL Service and click Properties
  8. Click the FILESTREAM tab
  9. Deselect all check boxes
  10. Click OK
  11. Restart the SQL Service
  12. Run the IISRESET command on each of the SharePoint Web Front End Servers

No comments:

Post a Comment