Monday, July 30, 2012

Implementing Remote BLOB Storage

1: Enable the FILESTREAM Provider

2: Provision a BLOB Store with the FILESTREAM Provider

3: Enable and Verify RBS

 

 

1: Enable the FILESTREAM Provider

In this task, you enable and configure the FILESTREAM RBS provider for SQL Server 2008 R2.

1. On the Start menu, point to All Programs, point to Microsoft SQL Server 2008 R2, point to Configuration Tools, and then click SQL Server Configuration Manager.

2. In the list of services, right-click SQL Server Services, and then click Open.

3. In the SQL Server Configuration Manager snap-in, locate the instance of SQL Server on which you want to enable FILESTREAM.

4. Right-click the instance and then click Properties.

5. In the SQL Server Properties dialog box, click the FILESTREAM tab.

6. Select the Enable FILESTREAM for Transact-SQL access check box.

7. Click Apply, and then click OK.

8. On the Start menu, point to All Programs, point to Microsoft SQL Server 2008 R2, and then click SQL Server Management Studio.

9. In SQL Server Management Studio, select the database for which you want to enable FILESTREAM and then click New Query to display the Query Editor.

10. In Query Editor, enter the following statements:

EXECsp_configurefilestream_access_level, 2

RECONFIGURE

11. Click Execute.

 

2: Provision a BLOB Store with the FILESTREAM Provider

1. Click Start, click All Programs, click Microsoft SQL Server 2008R2, and then click SQL Server Management Studio.

2. Enter the local server name and administrator credentials.

3. Expand Databases.

4. Select the “database you chose before” and then click New Query.

5. In the Query pane, execute each of the following statements in sequence:

use”Database name”

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”Database name”

if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database ”Database name” add filegroupRBSFilestreamProvider contains filestream

use”Database name”

alter database ”Database name” add file (name = RBSFilestreamFile, filename = 'c:\Blobstore') to filegroupRBSFilestreamProvider

 

3: Enable and Verify RBS

In this task, you use PowerShell to enable RBS in SharePoint 2010, upload a file into a document library, and confirm that the RBS provider stores the file on the file system as specified.

1. On the Start menu, click Programs, click Microsoft SharePoint 2010 Products, and then click SharePoint 2010 Management Shell.

2. At the Windows PowerShell command prompt, type each of the following commands in sequence:

$cdb = Get-SPContentDatabase –WebApplication “your web application URL”

$rbss = $cdb.RemoteBlobStorageSettings

$rbss.Installed()

$rbss.Enable()

$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])

$rbss

3. Browse to your web application URL, select Shared Documents, click the Documents option in the Ribbon, and then click Upload Document.

4. Select a Word file from your computer, and then click OK.

5. In Windows Explorer, browse to the c:\Blobstore directory, open the folder with the most recent modified date, and validate that the added Word fi

le file exists in the folder.

No comments:

Post a Comment