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

Advertisements

~ by alipka on June 19, 2010.

8 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 🙂

  5. Awesome write up! Followed to the letter! Only had to backup transaction logs before the ALTER DATABASE at end.

    Thank you so much m8! :]

  6. Please help, I was following this guide and when I was finished I get an error every time I try and open a file or on some web pages. 80131904 error comes up. Below is the error from the sharepoint logs. Its like it tries to open the file from blob storage but can’t find it! The files are 100% back into sql. Any ideas? My backup failed to restore! Any ideas are welcome and any help much appreciated!

    04/05/2013 23:14:13.88 w3wp.exe (0x1028) 0x0DF4 Office Web Apps Office Viewing Architecture 9rte Medium Request received for document F143f83fad1534adf8a6648a53765f120m53ace4e212e440d683fdc319fd31914bm2b498c23f03c438397db2fdfe0b6b378m, format: _v00000000-0000-0000-0000-000000000201, numberInQueue: 0, request id cb793dbc-cba1-4b7a-b2d8-5aa5071ed21c bbdc9848-386e-4c7c-8060-e413109e8454
    04/05/2013 23:14:13.88 w3wp.exe (0x1028) 0x0DF4 Office Web Apps Office Viewing Architecture c7ld Medium AppManager.BeginProcessRequest adding request to queue bbdc9848-386e-4c7c-8060-e413109e8454
    04/05/2013 23:14:13.89 w3wp.exe (0x1028) 0x0DF4 Office Web Apps Office Viewing Architecture 6ud7 Medium DownloadManager: Download requested for document: F143f83fad1534adf8a6648a53765f120m53ace4e212e440d683fdc319fd31914bm2b498c23f03c438397db2fdfe0b6b378m bbdc9848-386e-4c7c-8060-e413109e8454
    04/05/2013 23:14:13.89 w3wp.exe (0x1028) 0x0BA8 Office Web Apps Office Viewing Architecture bv6l Medium DownloadManager: Starting download for document F143f83fad1534adf8a6648a53765f120m53ace4e212e440d683fdc319fd31914bm2b498c23f03c438397db2fdfe0b6b378m. bbdc9848-386e-4c7c-8060-e413109e8454
    04/05/2013 23:14:13.90 w3wp.exe (0x1028) 0x0BA8 SharePoint Foundation Database d0d6 High System.Data.SqlClient.SqlException: Cannot find either column “mssqlrbs” or the user-defined function or aggregate “mssqlrbs.rbs_fn_get_blob_reference”, or the name is ambiguous. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.HasMoreRows() at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock) at Microsoft…. bbdc9848-386e-4c7c-8060-e413109e8454
    04/05/2013 23:14:13.90* w3wp.exe (0x1028) 0x0BA8 SharePoint Foundation Database d0d6 High …SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock) bbdc9848-386e-4c7c-8060-e413109e8454
    04/05/2013 23:14:13.90 w3wp.exe (0x1028) 0x0BA8 SharePoint Foundation General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80131904 bbdc9848-386e-4c7c-8060-e413109e8454
    04/05/2013 23:14:13.90 w3wp.exe (0x1028) 0x0BA8 SharePoint Foundation General 72k4 Medium 0x80131904 bbdc9848-386e-4c7c-8060-e413109e8454

  7. Any one get this error following this guide?

    System.Data.SqlClient.SqlException: Cannot find either column “mssqlrbs”

    SharePoint list files but when I go to open them I get and error. The backup has also failed so any help would be so awesome!

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

 
%d bloggers like this: