INTRODUCTION
I’m in the process of configuring SharePoint RBS Remote Blob Storage for a client’s SP 2016 on-premise installation. I thought I would be sharing in this article the steps I took to actually make it work. Some of the articles on the net are only partially working, so hopefully this article can paint a complete picture.
There is also additional complexity is that both DEV and UAT environment shares the same instance of SQL server which, by default, RBS installation does not support.
INSTALLING AND CONFIGURING RBS
use [WSS_Content]
if not exists (select * from sys.symmetric_keys where name = N’##MS_DatabaseMasterKey##’) create master key encryption by password = N’Admin Key Password !2#4′
—
use [WSS_Content]
if not exists
(select groupname from sysfilegroups
where groupname=N’RBSFilestreamProvider’)
alter database [WSS_Content]
add filegroup RBSFilestreamProvider contains filestream
—
use [WSS_Content]
alter database [WSS_Content]
add file (name = RBSFilestreamFile, filename =
‘c:\Blobstore’)
to filegroup RBSFilestreamProvider
Change C:\Blobstore above to any drive you wish to store the blob storage files in.
4. Still in the SQL Server, download RBS.msi from the following:
For SharePoint Server 2016, choose the correct install from the following list:
5. Still in SQL Server, open Command Prompt as Administrator and run the following in the folder you download RBS.msi into:
msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME=“WSS_Content” DBINSTANCE=“DBInstanceName” FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
Note in Red above the values you need to update to reflect your environment.
Once you have run the above, go to “Programs and Features” in Control Panel and you should be able to see SQL Remote Blob Storage application installed.
Also, if you open the log file rbs_install_log.txt, near at the very end of the file you should see this text:
Product: SQL Remote Blob Storage – Installation completed successfully.
Furthermore, through SQL Management Studio, if you reload your content database, you would be able to see RBS tables created. They are denoted with the word “mssqlrbs“.
6. Now, go to your SP Server. If you have multiple servers in your farm, starts with Central Admin server first. Download RBS.msi again from the link above. I would simply copy RBS.msi from SQL Server to my SP server. Then, in SP Server, open Command Prompt as Administrator, go to where RBS.msi is located and run the following:
msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi DBNAME=”WSS_Content” DBINSTANCE=”DBInstanceName” ADDLOCAL=Client,Maintainer,ServerScript,FilestreamClient,FilestreamServer
Similar to previously, go to “Programs and Features” and you should see SQL RBS installed. In the log file you would also be able to see a successful message near the end of the file.
Repeat step 6 for all servers in your farm. This command is pretty much installing RBS client onto your SP environment.
7. Ensure your Farm Account and IIS App Pool account of your SP web application is a dbo in the content database. This would allow SharePoint to communicate with RBS.
8. Then, in your SP Central Admin server, open SharePoint Management Shell and run the following:
$cdb = Get-SPContentDatabase WSS_Content
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss
The command above switches your SharePoint site from using content DB storage to using RBS storage for file uploads.
9. Finally, test if RBS is working. To do that, simply go to any library in your SP web app, and just upload any document. Then, go to SQL Server and go to your RBS drive eg. c:\Blobstore. You should be able to see your uploaded files in there.
INSTALLING MULTIPLE RBS FOR DIFFERENT ENVIRONMENT USING SAME SQL INSTANCE
As mentioned earlier, this particular client of mine only has 1 SQL Server with the same instance for their DEV and TEST environment. Now that we’ve configured RBS for, let’s say, DEV, we need to run the same for the TEST environment.
You may think that you can just simply repeat the steps, the thing is, we’ve already installed RBS on the SQL Server and is already running as a program there. So how do we do this? If you have similar scenario, follow the steps below:
use [WSS_Content_TEST]
if not exists (select * from sys.symmetric_keys where name = N’##MS_DatabaseMasterKey##’) create master key encryption by password = N’Admin Key Password !2#4′
—
use [WSS_Content_TEST]
if not exists
(select groupname from sysfilegroups
where groupname=N’RBSFilestreamProvider2‘)
alter database [WSS_Content_TEST]
add filegroup RBSFilestreamProvider2 contains filestream
—
use [WSS_Content_TEST]
alter database [WSS_Content_TEST]
add file (name = RBSFilestreamFile2, filename =
‘c:\BlobstoreTEST‘)
to filegroup RBSFilestreamProvider2
Please ensure the text highlighted in blue isn’t the same as the first one, otherwise it will not work.
2. Still in SQL Server, run the following but please ensure you’re using the new configuration:
msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME=”WSS_Content_TEST” DBINSTANCE=”DBInstanceName” FILESTREAMFILEGROUP=RBSFilestreamProvider2 FILESTREAMSTORENAME=FilestreamProvider_2
3. Then in your 2nd SP Farm ie. TEST, run the following:
msiexec /qn /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME=”WSS_Content_TEST” FILESTREAMSTORENAME=FilestreamProvider_2 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE=”DBServer”
4. Finally, in Central Admin run the following in SP Shell:
$cdb = Get-SPContentDatabase WSS_Content_TEST
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.GetProviderNames()
$rbss.SetActiveProvider(‘FilestreamProvider_2‘)
$rbss
You should see “FilestreamProvider_2” displayed in the Management Shell. This indicates that your TEST environment is now connected to the 2nd RBS in the same SQL server.
Hope this helps,
Tommy
We provides you the best Services in our themes.
Click on the link below to see a full list of clients which we have developed solutions and provided consultancy for.
We are solution-centered and not application-centered.
Being creative and having fun and yet still delivering a fantastic service is the center of our values.
TFS Consulting Services guarantees delivery that is within budget and deadline or you engage us for free.
Implementing IT solution does not have to be difficult. TFS Consulting Services has a lot of resources on planning and methodologies that will ensure successful delivery of your IT solution. TFS Consulting Services has been around in the web industry for more than 10 years and has experienced all the successes and failures of various type of IT deployment.
Do you need a technical resource? TFS Consulting Services can also provide you with technical resource for developing ASP.NET (C# and VB.NET), SharePoint (2003, 2007, 2010, 2013) and MS CRM applications. Our resource is an Microsoft Certified Personnel (MVP) and Microsoft Certified Technology Specialist (MCTS) in all ASP.NET, SharePoint and CRM.
Make sure your IT implementation is robust and scalable. TFS Consulting Services can provide consulting and advice on industry’s best practice on various web-related areas such as website security, design and usability, application-specific (such as SharePoint)’s best practice, Search Engine Optimisation (SEO), coding standards and many others.
Finally TFS Consulting Services provides you with solution development service. We mainly work with Microsoft technologies (ie. .NET and SQL Server), however we are also capable of developing with PHP and MySQL. If you ever need any business process automation, integration and solution development work, we are the trusted expert you should go to.
For more detailed service offerings please visit our Solutions page.
Tommy Segoro
tommy@tfsconsulting.com.au
+61 404 457 754
© TFS Consulting Services 2024. All rights reserved.