Ads

Wednesday, 27 March 2013

Configure RBS of SQL 2008 with SharePoint 2010 (Remote BLOB Storage) a best solution for storage films, images, files and documents


 BLOBs moved out of SQL Server 2008 with RBS and Blobs Caching

First of all we see what is an added file in ShareDocument of SharePoint 2010.

And the what and where the pdf file is store on hard disk by RBS feature of SQL Server 2008 R2.

Original information of the pdf file.

Now we make 22 steps bellow to configure RBS for SQL Server by FileStream provider, then configure SharePoint 2010 to run with RBS feature.

1.  Start -> all Programs -> Microsoft SQL Server 2008 R2 -> Cofiguration Tools -> SQL Server Configuration Manager
2. Go to Properties of a SQL Server Instance
3.  Enable FileStream and set options for SQL Server 2008 Instance Service.
Check if your DataBase Instance version is 10.50.1600.1. If not you must remove the instance and resetup

4. Start -> all Programs -> Microsoft SQL Server 2008 R2 -> SQL Server Management Studio
5. Connect to a SQL Service instance.
6.  New Query for SQL Service instance. 

7.  Execute sp_configure comment.
EXEC sp_configure filestream_access_level, 2
RECONFIGURE

Can be see another link with text illustration only. Enable FileStream of SQL Server 2008

8.  View content database of a Web Application.
9.  New Query for a Content DataBase.
10. Run comment with sys.symmetric_keys.
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'
11.  Run comment with table sysfilegroups
 use [WSS_Content]
if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database [WSS_Content]
 add filegroup RBSFilestreamProvider contains filestream

12. Add RBSFileStream location.
use [WSS_Content]
alter database [WSS_Content] add file (name = RBSFilestreamFile, filename = 'c:\Blobstore') to filegroup RBSFilestreamProvider

13. C driver before add folder location for RBSFileStream.
14.  BlobStore in C driver after run adding folder location for RBSFileStream.
15. Dowload RBS_X64.msi Click to download
Or from http://go.microsoft.com/fwlink/?LinkID=188395&clcid=0x409

16. Click on Start ->  Run...
17.  Run cmd comment . (Type cmd)
18. Run an msiexec comment to install RBS on a Web server.
msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="SharePoint" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1

You can replace TrungVo\SharePoint by your database name.
Also replace WSS_Content by each database name that configure with each SharePoint web application.

18. Installation result on rbs_install_log .

Can see all content in rbs_install_log 
19. ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer".
 msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi DBNAME="WSS_Content" DBINSTANCE="SharePoint" ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer"

Can see all result of install RBS on port 81 Install Result of RBS on port 81 
20. Open SharePoint 2010 Management Shell / Mở Power Shell của SharePoint 2010

21.  Enable RBS for a Web Application
 Run comment Get-SPContentDatabase
$cdb = Get-SPContentDatabase –WebApplication http://TrungVo

You can change http://TrungVo by URL of your web front end location
And run well with another rbs commands
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss
If you see result is False after run $rbss.Installed() so you must check if two commands
msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="SharePoint" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1
msiexec /qn /lvx* rbs_install_log.txt /i RBS_X64.msi DBNAME="WSS_Content" DBINSTANCE="SharePoint" ADDLOCAL="Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer"

Setup well RBS_X64.msi on database WSS_Content of Instance SharePoint or not by check msslqrbs.* tables
If you can not see the mssqlrbs.* tables you must setup RBS_X64.msi manually for each database name of each instance.
22. Test RBS with SharePoint 2010
Add a pdf file to ShareDocument

 The same file be added to blob stored location
Information of pdf file

23. Blobs Caching
Improve reading files performance for SharePoint 201

No comments:

Post a Comment

Ads