Disabling RBS in Sharepoint 2010 and migrate RBS Filestrem files into the database

I found all the steps just as difficult to figure out as for installing. Below are my findings on how I managed to disable R?BS and remove it completely of my sharepoint (I had 1 content db using it).

Backup 1st: Backup site collection with stsadm, backup SQL db, backup RBS blob storage (NTFS – copy when SQL server service is stopped).

Migrate all content off RBS to SQL and disable RBS for content db:

$cdb=Get-SPContentDatabase <ContentDbName>

$rbs=$cdb.RemoteBlobStorageSettings

$rbs.GetProviderNames()

$rbs.SetActiveProviderName(“”)

$rbs.Migrate() –note: this might take some time depending on amount of data in your RBS store

$rbs.Disable()

Change the default RBS garbage collection window to 0 on your content db:

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′

Run RBS Maintainer (and disable the task if you scheduled it):

“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:

On your content DB run: exec mssqlrbs.rbs_sp_uninstall_rbs 0

Uninstall from add/remove SQL Remote Blob Storage.

I found that there were still filestream references in my DB, so run this on your content DB:

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”)

Now you can remove the file and filegroup for filestream:

ALTER DATABASE yourdbname Remove file RBSFilestreamFile;

ALTER DATABASE yourdbname REMOVE FILEGROUP RBSFilestreamProvider;

Last step: Disable filestream in SQL Configuration Manager for your instance (if you do not use it anywhere aside this single content db with sharepoint), run SQL reset and iis reset and test.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s