IT tutorials
 
Technology
 

Sharepoint 2010 : Lists Scalability in SharePoint (part 3) - SharePoint 2010 RBS Storage

10/2/2013 1:59:57 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

5. SharePoint 2010 RBS Storage

RBS stands for Remote Blob Storage. In SharePoint, any document that you upload into any SharePoint site, all the metadata and the actual blob are both stored in SQL Server, specifically in the content database. As I mentioned earlier, there are many situations in which you might want to change this behavior, and allow a SharePoint installation to store its binary blobs outside of the SharePoint server database:

  • You may want to separate out large blobs, say video files, and store them on a non-database file store for performance reasons.

  • SQL storage is generally expensive when compared with simple file stores.

  • Larger blobs also mean longer backup and recovery times for the SharePoint content databases.

  • Blobs generally hold files that are sometimes very critical. They may need to be "shredded" when they are deleted, or maybe (depending upon the need they need to be immutable) only new versions can be created. Shredding individual files as they are stored in the databases is not an easy thing to do, but is more manageable on a file store.

  • Databases store blobs using varbinary(max) column types. This means that the maximum file size is limited to 2GB. Blob stores have no such limitation.

All these problems are solved by RBS. In order to use RBS, you will have to use SQL Server 2008 R2 or better with SharePoint 2010. With SharePoint 2010, you have the ability to make the BLOB store externalizable at a per-content database level. By specifying a SQL RBS provider, you choose to redirect the actual blobs to some external storage, but the metadata continues to live in the content database. Thus, the SharePoint object model doesn't know the difference between whether your content database is storing the blobs within itself or redirecting the blobs to an external blob store.

As the third-party marketplace develops, there will be many third-party RBS providers. From Microsoft, however, RBS for SQL Server 2008 R2 is a downloadable stand-alone component. You can download this provider from http://go.microsoft.com/fwlink/?LinkId=177388.

Go ahead and download this provider. Before you can install it, however, you need to configure your SQL Server installation to work under Filestream. If you did not enable Filestream on your SQL Server installation during setup, you can still do so by going to SQL Server configuration tools, finding the service running your SQL Server, choosing right click\properties on the service, and going to the FILESTREAM tab. Configure to run Filestream as shown in Figure 4.

Figure 4. Enabling Filestream

Then, in SQL Server Management Studio, execute the following command:

EXEC sp_configure filestream_access_level, 2
RECONFIGURE

Next, execute the TSQL script shown in Listing 2 in SQL Server Management Studio to create a master encryption key and to set up the blobstore file group in the WSS_Content database.

Example 2. TSQL Script for Configuring Filestream support on WSS_Content
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'

if not exists (select groupname from sysfilegroups where
groupname=N'RBSFilestreamProvider')alter database WSS_Content
add filegroup RBSFilestreamProvider contains filestream

alter database [WSS_Content] add file (name = RBSFilestreamFile, filename = 'c:\Blobstore') to
filegroup RBSFilestreamProvider


You may verify at this point that a directory called c:\Blobstore has been created for you, and an RBSFilestreamProvider Filegroup has been created for you under the WSS_Content database. This can be seen as shown in Figure 5.

Figure 5. The RBSFilestreamProvider under filegroups

You are now ready to install and configure your RBS provider. Once the provider is downloaded, go ahead and install it by executing the following command from DOS Prompt, in the same directory where the RBS blob provider you downloaded earlier is saved:

msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true
FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="SP2010"
FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMFILEGROUP=RBSFilestreamProvider
FILESTREAMSTORENAME=FilestreamProvider_1


Give the previous command about a minute to run. It should produce an output in a file called rbs_install_log.txt. Open that file, and look for the following line toward the end of the log file.

Product: SQL Remote Blob Storage -- Installation completed successfully.

This line indicates that the RBS provider was successfully installed. At this point, changes have been made to the content database. You should verify that by opening the content database, and looking for numerous tables that start with "mssqlrbs".

If you are doing this in a production environment, it will need to be installed on all web servers and application servers; install the RBS Provider on each web front end. You can do so using this command:

msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi DBNAME="WSS_Content" DBINSTANCE="SP2010"
ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer"


Next, you need to enable and test RBS. In order to do so, launch the SharePoint 2010 management shell (which is a customized power shell for SharePoint and can be found under Programs\Microsoft SharePoint 2010 products\SharePoint 2010 management shell). In that shell, execute the following script:

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

Next, visit your SharePoint site and create a new document library there. In this document library, go ahead and upload a file. It would be rather nice if you can upload an image file instead. I have included a sampleimage.jpg with the source code for this purpose. Note that the image file gets uploaded into the document library as you expected SharePoint to do.

Now things get interesting. Visit the C:\Blobstore directory and sort by Date Modified. Look forthe GUID looking directory that was modified last. Inside it you will find another directory that looks like a GUID. Strangely enough, these GUIDs correspond to the Site Collection GUID and the Document library GUID. Keep drilling down until you see a file sitting on the file system (see Figure 6).

Figure 6. Stored file on the file system, thanks to the RBS provider

Drag and drop that file into Internet Explorer. What do you see? You should see the same image you had uploaded load up Internet Explorer (see Figure 7).

Figure 7. It's the same image you put in the document library.

Thus as you can see, the RBS storage mechanism redirected the blob to the filestream. The SharePoint object model is blissfully ignorant of this redirection, so your applications continue to function as-is.
 
Others
 
- Sharepoint 2010 : Lists Scalability in SharePoint (part 2) - List Column Indexing, List Throttling
- Sharepoint 2010 : Lists Scalability in SharePoint (part 1) - Scalability versus Performance
- Sharepoint 2010 : SharePoint Events (part 2) - SharePoint 2010 Improvements in the Event Model
- Sharepoint 2010 : SharePoint Events (part 1)
- Windows 7 : Troubleshooting VPN Client Connectivity
- Windows 7 : Understanding the Remote Access VPN Connectivity Process
- Understanding Windows 7 VPN Tunneling Protocols
- Sharepoint 2013 : Upgrading from SharePoint 2010 - Upgrade (part 4) - Upgrading Site Collections
- Sharepoint 2013 : Upgrading from SharePoint 2010 - Upgrade (part 3) - Attach Content Databases
- Sharepoint 2013 : Upgrading from SharePoint 2010 - Upgrade (part 2) - Attach Service Applications
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us