|
The connection string in the Maintainer are specified in the maintainer.exe.config file (lives with the exe) . The connection string are either all encrypted or none. The default connection string that the RBS specifies is always encrypted and its a good
practice to encrypt the connection strings ..
Here is how you need to specify the connection strings :
[From any WFE where you want to run GC]
1. For each content Database that is RBS enabled :Add content database connection string to the Microsoft.Data.SqlRemoteBlobs.Maintainer.exe.config file
a. Rename the existing config file to web.config using following command (located in %programfiles%\Microsoft SQL Remote Blob Storage 10.50\Maintainer )
cd /d %programfiles%\Microsoft SQL Remote Blob Storage 10.50\Maintainer
ren Microsoft.Data.SqlRemoteBlobs.Maintainer.exe.config web.config
b. Un-encrypt the connection strings from the config file by using following command (aspnet_regiis is located in %windir%\Microsoft.NET\Framework64\v2.0.50727
cd /d %windir%\Microsoft.NET\Framework64\v2.0.50727
aspnet_regiis.exe -pdf connectionStrings "%programfiles%\Microsoft SQL Remote Blob Storage 10.50\Maintainer"
c. Add additional connection string to the web.config file for each content database that is rbs enabled like following . Change the name of connection string , data source and Initial Catalog
as needed
<connectionStrings>
<add connectionString="Data Source=localhost;Initial Catalog=RemoteBlobStorage;Integrated Security=True;Application Name="Remote Blob Storage Maintainer""
providerName="System.Data.SqlClient" />
<add connectionString="Data Source=wsslab40;Initial Catalog=wss_content;Integrated Security=True;Application Name="Remote Blob Storage Maintainer for WSS_Content""
providerName="System.Data.SqlClient" />
</connectionStrings>
d. Encrypt the web.config file again by using following command
cd /d %windir%\Microsoft.NET\Framework64\v2.0.50727
aspnet_regiis -pef connectionStrings "%programfiles%\Microsoft SQL Remote Blob Storage 10.50\Maintainer " -prov DataProtectionConfigurationProvider
e. Rename the file back to original
cd /d %programfiles%\Microsoft SQL Remote Blob Storage 10.50\Maintainer
ren web.config Microsoft.Data.SqlRemoteBlobs.Maintainer.exe.config
Note: XML file is case sensitive, you need to use the exact string for 'connectionStrings' parameter above.
2. Create a Maintenance Task using following steps (for each database)
1. Click Start, point to Administrative Tools, and click Task Scheduler.
2. Right-click Task Scheduler (Local) and click Create Task.
3. Click the Actions tab and click New.
4. On the New Action page, specify:
i. Action as Start a Program.
ii. For the Program/script, click Browse and navigate to the RBS Maintainer application; by default, the location is %programfiles%\Microsoft SQL Remote Blob Storage 10.50\Maintainer \Microsoft.Data.SqlRemoteBlobs.Maintainer.exe.
iii. In the Add Arguments (optional) field, enter the following parameter string: (change the name of the connection string as specified in the config file earlier)
-ConnectionStringName RBSMaintainerConnection -Operation GarbageCollection ConsistencyCheck ConsistencyCheckForStores -GarbageCollectionPhases rdo -ConsistencyCheckMode r -TimeLimit 120
iv. Click OK
Note: XML file is case sensitive, you need to use the exact string for the connection string above.
5. On the Triggers tab, click New.
6. In the New task dialog box, set:
i. Begin the task to On a schedule.
ii. The trigger schedule to be Weekly, Sunday, at 2am (or at another time when system usage is low.)
iii. Click OK.
7. On the General tab, enter a name for the task, such as “<Database Name> RBS Maintainer”, where <Database Name> identifies the database associated with the task. In the
Security settings section:
8. Make sure that the account under which the task is to be run has sufficient permissions to the database.
9. Select the option to Run whether user is logged on or not.
10. Click OK.
Please refer the GC discussion @ http://blogs.msdn.com/sqlrbs/archive/2008/08/08/rbs-garbage-collection-settings-and-rationale.aspx
on more information on the different GC options for RBS
|