Important Note: Issue described below should be fixed in Cumulative update package 2 for SQL Server 2012 Service Pack 1. Hotfix KB2767183.
Recently, I was trying to setup RBS for Sharepoint 2010. I found more than enough step-by-step guides on the internet, which were very useful and helpful.
My Sharepoint farm was divided into two tiers - one machine as APP/WFE and second one as database server (SQL Server 2012). After enabling FILESTREAM and provisioning BLOB store for first database, I went to the APP/WFE machine and started installation of RBS client library (for SQL Server 2012 - x64 package). Installation was successful and few new tables with mssqlrbs prefix were created under a given database. When I enabled RBS for content database via Powershell and uploaded first file into Sharepoint everything worked as expected. But...
Problem: The problem occured when I tried to set RBS for second content database. After provisioning BLOB store for second database and installation of part of RBS package, I found an error message in log file. Neither new tables were not created in database..
Snippet from log file:
MSI (s) (D0!28) [01:12:54:611]: Closing MSIHANDLE (228) of type 790531 for thread 4392
Installing the FILESTREAM blob store failed with error message:
RBS Error. Original Error: Number 2601, Severity 14, State 1, Procedure rbs_sp_add_blob_store, Line 64,
Message: Cannot insert duplicate key row in object 'mssqlrbs_resources.rbs_internal_blob_stores' with unique index 'rbs_internal_blob_stores_ix_name'. The duplicate key value is (FilestreamProvider_1).
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.Investigation: Error message from log file looks very desciptive. The stored procedure tries to insert duplicate key. But why? I used different name of content database. After deeper investigation of log file I found another two very important parts:
MSI (s) (D0:0C) [01:12:23:767]: PROPERTY CHANGE: Modifying DBNAME property. Its current value is 'RemoteBlobStorage'. Its new value: 'wss_content_test'.
Here was value of DBNAME set to "wss_content_test", what is the name of my second content db.
And a few lines below...
MSI (s) (D0:0C) [01:12:23:923]: PROPERTY CHANGE: Modifying DBNAME property. Its current value is 'wss_content_test'. Its new value: 'WSS_Content_kkm'
...DBNAME is set back to previous value. Because this value has to be stored somewhere, I started looking for it in Windows registry. And I had success.
Resolution: Under HKLM->Software->Microsoft->Remote Blob Storage key I found the name of first content database (WSS_Content_kkm), which was used to rewrite DBNAME value during configuration of RBS for second db.
After I changed the value in registry to the right one (WSS_Content_test) and ran the RBS configuration for second content database again, everything worked perfectly. Also the log file showed sucessful configuration message and new tables in content database were created.
MSI (s) (D0:44) [01:18:33:010]: Note: 1: 1728
MSI (s) (D0:44) [01:18:33:010]: Product: Microsoft SQL Server 2012 Remote BLOB Store -- Configuration completed successfully.
Finally, after nearly two days of trying to get this working, your point about modifying the registry key fixed this for me.
ReplyDeleteThank you!!