Who's Online
4 visitors online now
0 guests, 4 bots, 0 members
Support my Sponsor
  • An error has occurred, which probably means the feed is down. Try again later.

Posts Tagged ‘Steps’

Steps to configure RBS on multiple content database in SharePoint 2013 with SQL server 2012 or 2014

Hi Friends,

Today we will try to understand how to configure RBS(Remote Blob Service) on single or multiple content databases in SharePoint 2013 with SQL server 2012 or 2014. Steps are nearly same with both SQL server but make sure you use the correct msi file. For SQL serve 2012 size of msi file would be 5120 kb which can be downloaded from here .  For SQL serve 2014 size of msi file would be 4380 kb which can be downloaded from SQL server 2014 feature pack here 

 

Once you have downloaded the file save it on empty folder on c: or d: drive

  1. Once database is created from SharePoint server, execute below command on SQL server

EXEC sp_configure filestream_access_level, 2
RECONFIGURE

0192

  1. Then we need to select the content database from top and execute below command(password can be changed)

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′

0193

  1. Now you need to execute below command on content database(wss_content5 database name needs to be changed)

if not exists (select groupname from sysfilegroups where groupname=N’RBSFilestreamProvider’)alter database [WSS_Content5] add filegroup RBSFilestreamProvider contains filestream

0194

 

  1. Now we will add the physical path of RBS datafiles to content database. You can change the database name and filepath

alter database [WSS_Content5] add file (name = RBSFilestreamFile, filename = ‘C:\Blobstore5’) to filegroup RBSFilestreamProvider

0195

 

 

  1. Now you need to run below command on Windows Powershell (run as admin). Go to folder which has the rbs.msi file we downloaded.(Make note of FilestreamProvider name. Change SQL servaer and content databasename)

msiexec /qn /lvx* rbs_install_log_db5.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME=”WSS_Content5″ DBINSTANCE=”SQLservername” FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider

If you see the rbs_install_log_db5.txt file to be less then 1000 kb, e.g. 482 kb, it means it didn’t work. If this has worked fine you will see above 1000 kb e.g. 1218 kb.

You can also validate that rbs related tables are added to database as shown below.

0196

Note: if you face issues while running command, try to reboot both SQL and SharePoint server. I know this is not a solution but a workaround to the known issue you might get. You can also try SQL service restart and iisreset on sharepoint server. You may also check eventviewer log to find symptoms of the issue.

6. On SharePoint server run below command on windows powershell:
msiexec /qn /lvx* rbs_install_log.txt /x RBS.msi DBNAME=”WSS_Content5″ DBINSTANCE=”SQLservername” ADDLOCAL=”Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer”

Note: if you face issues while running command, try to reboot both SQL and SharePoint server. I know this is not a solution but a workaround to the known issue you might get. You can also try SQL service restart and iisreset on sharepoint server. You may also check eventviewer log to find symptoms of the issue.

 

  1. Now run below command 1 by 1 in SharePoint powershell and update the active providername and enable the RBS on content DB.

$cdb = Get-SPContentDatabase –WebApplication http://testspimgweb01
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])

To migrate existing content (Make sure you run this even if you don’t have any existing data.)
$rbss.Migrate()

0197

Note:  Also every database in web application needs RBS to be enabled or above command will fail.

  1. Now if you create site collection and upload a file, you will observe it is moved to this folder you created with SQL command in step 4.

0198

 

Note: You need to run these command for every content database you want enable RBS on.

 

Troubleshooting:  When you run these command, you might face permission issues. To resolve these issue make sure you have full access on C:\Program Files\Common Files\microsoft shared and registry. When you run these command, you may not find the error in the log file so run the rbs.msi file and make sure you find all the permission issue in GUI. Many a time when you assign permission on root folder on drive or key in registry, it will not be inherit to subfolder. Make sure you go to the folder shown in error and assign owner permission.

 

Hope this was helpful.