How to disable RBS in Sharepoint 2010

Continuing the struggle with Remote Blob storage and Sharepoint. I have decided against using it (for now) – why? Management of it is a pain, and so for now I just use dedicated SQL databases for site collections (yes you can do this with MOSS2010). RBS in my virtualized scenario did not make much sense, since I was still utilizing the same physical disks, just moving content from SQL to NTFS, which for v. large content db would make sense, but with MOSS2010 the recommended max is now 200GB. So use RBS only if you have DBs growing near above 200GB and you have separate (usually slower/cheaper) storage disks for your RBS filestream.

But how to disable RBS on your sharepoint 2010 content DB? 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.

You will find those links useful:

http://sqlrbs.codeplex.com/Thread/View.aspx?ThreadId=204627

http://technet.microsoft.com/en-us/library/ff628255.aspx

http://technet.microsoft.com/en-us/library/ff628259.aspx

http://beyondrelational.com/blogs/jacob/archive/2010/03/11/completely-removing-filestream-features-from-a-sql-server-2008-database.aspx

Advertisement

~ by alipka on June 19, 2010.

5 Responses to “How to disable RBS in Sharepoint 2010”

  1. I agree, in my testing RBS is too much of a pain to maintain, will stick with WSS 3 for now unitl we upgrade SQL to 2008 R2

  2. Once I run Maintainer script I get the following: System.Data.SQLClient.SQLException: Could not find stored procedure ‘mssqlrbs.rbs_sp_get_config’

    Any ideas?

  3. Followed all the steps and SQL tells me:
    Msg 5042, Level 16, State 10, Line 1
    The file ‘RBSFilestreamFile’ cannot be removed because it is not empty.
    Msg 5042, Level 16, State 11, Line 1
    The filegroup ‘RBSFilestreamProvider’ cannot be removed because it is not empty.

    What next?

    • Update:
      I dropped the 4 rbs_filestream_* tables that were still in the Content DB and was then able to execute the last 2 ALTER statements with success.

  4. thnx for the useful info :)

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 )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.