how to install and configure Remote BLOB Storage (RBS) in a SharePoint 2013 farm
What is RBS
One of the new things in SQL Server 2008 r2is Remote Blob Storage (RBS) which allows admins to setup SQL to save data that would normally go into a BLOB field to be stored somewhere else using an RBS provider. This provider could store data on a cheaper disk solution (compared to the expensive disk solutions usually selected for SQL Server), to a SAN or maybe even into the cloud… it really doesn’t matter where. The point is that BLOBs can be kept out of a SQL Server DB.
RBS is composed of the following components:
-
RBS client library
An RBS client library consists of a managed library that coordinates the BLOB storage with SharePoint 2013, SQL Server, and RBS provider components.
-
Remote BLOB Storage provider
An RBS provider consists of a managed library and, optionally, a set of native libraries that communicate with the BLOB store.
An example of an RBS provider is the SQL FILESTREAM provider. The SQL FILESTREAM provider is a feature of SQL Server 2008 that enables storage of and efficient access to BLOB data by using a combination of SQL Server 2008 and the NTFS file system. For more information about FILESTREAM, see FILESTREAM Overview (http://go.microsoft.com/fwlink/p/?LinkID=166020&clcid=0x409) andFILESTREAM Storage in SQL Server 2008 (http://go.microsoft.com/fwlink/p/?LinkID=165746&clcid=0x409).
-
BLOB store
A BLOB store is an entity that is used to store BLOB data. This can be a content-addressable storage (CAS) solution, a file server that supports Server Message Block (SMB), or a SQL Server database.
Why we need RBS
By using RBS for SharePoint, customer maybe able to leverage cheaper storage, improve performance, and enable better integration stories with 3rd party technology for their SharePoint databases. But be careful, the benefit is different case by case.
What all we need
SQL Server 2008 R2.
SharePoint Server 2013
How to configure
Before you begin this operation, review the following information about prerequisites:
-
The user account provisioning RBS stores must be a member of thedb_owner fixed database role on each database that you are configuring RBS for.
-
The user account installing the client library must be a member of the Administrators group on all of the computers where you are installing the library.
-
The user account enabling RBS must have sufficient permissions to run Windows PowerShell.
1. Enable FILESTREAM on the database server
Enable FILESTREAM for file I/O streaming access.
Allow remote clients to have streaming access to FILESTREAM data.
The Step: enable and change FILESTREAM settings
On the Start menu, point toAll Programs, point toMicrosoft SQL Server Code-Named 2012, point toConfiguration Tools, and then clickSQL Server Configuration Manager.
In the list of services, right-click SQL Server Services, and then click Open.
In the SQL Server Configuration Manager snap-in, locate the instance of SQL Server on which you want to enable FILESTREAM.
Right-click the instance, and then click Properties.
In the SQL Server Properties dialog box, click theFILESTREAM tab.
Select the Enable FILESTREAM for Transact-SQL access check box.
If you want to read and write FILESTREAM data from Windows, clickEnable FILESTREAM for file I/O streaming access. Enter the name of the Windows share in theWindows Share Name box.
If remote clients must access the FILESTREAM data that is stored on this share, selectAllow remote clients to have streaming access to FILESTREAM data.
Click Apply.
In SQL Server Management Studio, click New Query to display the Query Editor.
In Query Editor, enter the following Transact-SQL code:
Transact-SQLEXEC sp_configure filestream_access_level, 2 RECONFIGURE
Click Execute.
Restart the SQL Server service.
2. To provision a BLOB store
Confirm that the user account performing these steps is a member of the db_owner fixed database role on each database that you are configuring RBS for.
Click Start, click All Programs, click Microsoft SQL Server 2008, and then click SQL Server Management Studio.
Connect to the instance of SQL Server that hosts the content database.
Expand Databases.
Click the content database for which you want to create a BLOB store, and then clickNew Query.
Paste the following SQL queries in Query pane, and then execute them in the sequence listed. In each case, replace[WSS_Content] with the content database name, and replacec:\BlobStore with the volume\directory in which you want the BLOB store created. The provisioning process creates a folder in the location that you specify. Be aware that you can provision a BLOB store only one time. If you attempt to provision the same BLOB store multiple times, you'll receive an error.
Tip:
For best performance, simplified troubleshooting, and as a general best practice, we recommend that you create the BLOB store on a volume that does not contain the operating system, paging files, database data, log files, or the tempdb file.
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 filestreamuse [WSS_Content] alter database [WSS_Content] add file (name = RBSFilestreamFile, filename = 'c:\Blobstore') to filegroup RBSFilestreamProviderHere is the step:
Note: You should step by step do it , or it will wrong.
3. Install the RBS client library on each web server
You must install RBS client library on all web servers in the SharePoint farm. The RBS client library is installed only one time per web server, but RBS is configured separately for each associated content database. The client library consists of a client-side dynamic link library (DLL) that is linked into a user application, and a set of stored procedures that are installed on SQL Server.
Warning:
Do not install the RBS client library by running the RBS_amd64.msi file and starting the Install SQL Remote BLOB Storage wizard. The wizard sets certain default values that are not recommended for SharePoint 2013.
1. To install the RBS client library on the on the first web server
You must install RBS client library on all web servers in the SharePoint farm. The RBS client library is installed only one time per web server, but RBS is configured separately for each associated content database. The client library consists of a client-side dynamic link library (DLL) that is linked into a user application, and a set of stored procedures that are installed on SQL Server.
1. Confirm that the user account performing these steps is a member of the Administrators group on the computer where you are installing the library.
2. On any web server, browse to http://go.microsoft.com/fwlink/p/?LinkId=271938 anddownload the RBS_amd64.msi file.
3. Copy and paste the following command into the Command Prompt window. ReplaceWSS_Content with the database name, and replaceDBInstanceName with the SQL Server instance name. You should run this command by using the specific database name and SQL Server instance name only one time. The action should finish within approximately one minute.
msiexec /qn /lvx* rbs_install_log.txt /i RBS_amd64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
Note:
1. WSS_Content isthe database name,DBInstanceName isthe SQL Server instance name
2. And the SQL Server instance name should be carful, it is relative with you sharepoint content database
3. The RBS_amd64.msi could download in the link http://go.microsoft.com/fwlink/p/?LinkId=271938
4. RBS_amd64.msi is install file, and rbs_install_log.txt is the log file. both of them is mean location.
For Exampl: msiexec /qn /lvx* C:\Users\v-trdong.FAREAST\rbs_install_log.txt /i C:\Users\v-trdong.FAREAST\RBS_amd64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="v-trdong\sharepoint" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
2. To install the RBS client library on all additional web and application servers
Confirm that the user account performing these steps is a member of the Administrators group on the computer where you are installing the library.
On any web server, browse to http://go.microsoft.com/fwlink/p/?LinkId=271938 anddownload the RBS_amd64.msi file.
Click Start, click Run, type cmd into theRun text box, and then clickOK.
Copy and paste the following command into the Command Prompt window. Replace WSS_Content with the database name, and replace DBInstanceName with the name of the SQL Server instance. The action should finish within approximately one minute.
msiexec /qn /lvx* rbs_install_log.txt /i RBS_amd64.msi DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" ADDLOCAL=Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer
Repeat this procedure for all web servers and application servers in the SharePoint farm.
3. To confirm the RBS client library installation
The rbs_install_log.txt log file is created in the same location as the RBS_amd64.msi file. Open the rbs_install_log.txt log file by using a text editor and scroll toward the bottom of the file. Within the last 20 lines of the end of the file, an entry should read as follows: Product: SQL Remote Blob Storage – Installation completed successfully.
2. On the computer that is running SQL Server 2008, verify that the RBS tables were created in the content database. Several tables should be listed under the content database that have names that are preceded by the letters "mssqlrbs".
What if ?
- if we don't find any rbs tables.
- Reinstall RBS.msi again
4. Enable RBS for each content database
You must enable RBS on one web server in the SharePoint farm. It is not important which web server that you select for this activity, as long as RBS was installed on it by using the previous procedure. You must perform this procedure one time for each content database.
Note:
You can only enable RBS by using Windows PowerShell.
To enable RBS by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
At the Windows PowerShell command prompt, type the following command:
$cdb = Get-SPContentDatabase <ContentDatabaseName> $rbss = $cdb.RemoteBlobStorageSettings $rbss.Installed() $rbss.Enable() $rbss.SetActiveProviderName($rbss.GetProviderNames()[0]) $rbssFor example:
5. Test the RBS installation
You should test the RBS installation on one web server in the SharePoint farm to make sure that the system works correctly.
To test the RBS data store
-
On the computer that contains the RBS data store, clickStart, and then clickComputer.
-
Browse to the RBS data store directory.
-
Confirm that the folder is empty.
-
On the SharePoint farm, upload a file that is at least 100 kilobytes (KB) to a document library.
-
On the computer that contains the RBS data store, click Start, and then clickComputer.
-
Browse to the RBS data store directory.
-
Browse to the file list and open the file that has the most recent changed date. This should be the file that you uploaded.
More to link : http://technet.microsoft.com/en-us/library/ee748631.aspx