Configuring Remote BLOB Store

RBS deployments are configured by passing key/value pairs from the application or database administrator to RBS. Each key/value pair specifies a setting to configure and a new value for that setting. Each value must have one of six different data types, listed below.

Data type name

Description

Binary

A binary type.

Boolean

A Boolean

Duration

A String representation of the Duration. Durations may be encoded as "days [number]" or "time hh:mm:ss".

Name

A string.

Number

An integer.

Version

Specifies a version number in the "aa.bb.cc.dd" format, where aa, bb, cc and dd are 16-bit integers.

The current RBS configuration can be seen using the mssqlrbs.rbs_config view. You can modify it by using the mssqlrbs.rbs_sp_set_config_value stored procedure, specifying the key name and a string representation of the new key value as parameters.

The following table lists the names, descriptions, and formats of all configurable RBS settings.

ConfigItem key

Description

Format

default_blob_store_name

Specifies the name of BLOB store that will be used use if no default for collection is specified and no store is specified at runtime, must be a name of existing blob store. No default value is defined.

Name

min_client_library_version_required

No application using a version of RBS lower than the value specified by this key will be allowed to work with this database. The default value is 10.0.0.0.

Version

set_xact_abort

Determines whether xact_abort should be set for RBS stored procedures. The default value is false.

Boolean

set_trust_server_certificate

Determines whether RBS should trust the server certificate for creating an encrypted connection to download BLOB store credentials. The default value is false.

Boolean

maintain_blob_id_compatibility

Determines whether the BlobId for new BLOBs must be formatted for SQL Server 2008. The default value is false.

Boolean

disable_pool_slicing

Determines whether optimization of the orphan cleanup phase of garbage collection is disabled. This optimization can provide better garbage collection task granularity, but can also cause compatibility issues for the SQL Server 2008 version of the RBS Maintainer. The default value is false.

Boolean

gcr_num_blobs_per_work_unit

Specifies the number of BLOBs in a single work unit for the reference scan phase of garbage collection. This setting can be used to control task granularity. The default value is 100000.

Number

gcr_num_blobs_per_iteration

Specifies the number of BLOBs that can be checked in a single transaction for the reference scan garbage collection phase. This value can be used to control the tradeoff between the overhead of creating and committing transactions and number of locks held. The default value is 1000.

Number

gco_num_blobs_per_iteration

Specifies the number of BLOBs that can be checked in a single transaction for the orphan cleanup garbage collection phase. This value can be used to control the tradeoff between the overhead of creating and committing transactions and number of locks held. The default value is 1000.

Number

gcd_num_blobs_per_iteration

Specifies the number of BLOBs that can be checked in a single transaction for the delete propagation garbage collection phase. This value can be used to control the tradeoff between the overhead of creating and committing transactions and number of locks held. The default value is 1000.

Number

gco_enum_num_blobs_per_iteration

Specifies the number of BLOBs to enumerate in a single call to the BLOB store for orphan cleanup. The default value is 1000.

Number

max_consistency_issues_found

Specifies the number of consistency issues of a single type that can be found before further checks will be cancelled. The default value is 1000.

Number

max_consistency_issues_returned

Specifies the maximum number of consistency issues that will be reported by the maintainer. The default value is 100.

Number

delete_scan_period

Specifies the minimum amount of time that must pass between two reference scan garbage collection runs. The default value is 30 days.

Duration

orphan_scan_period

Specifies the minimum amount of time that must pass between two orphan cleanup garbage collection runs. The default value is 30 days.

Duration

garbage_collection_time_window

Specifies the minimum time that must pass between identifying a blob as having no references in the database and deleting the blob from the store. This guarantees the availability of BLOBs for the specified time in case a backup is restored. The default value is 30 days.

Duration

garbage_collection_slice_duration

Specifies the length of a time in a single orphan cleanup phase garbage collection work unit. A value of 0 means that a single garbage collection slice should cover the entire duration of the cleanup, without dividing it into smaller pieces. This setting is ignored if disable_pool_slicing is set to true. The default value is 7 days.

Duration

configuration_check_period

When the RBS Client Library finds evidence of possible errors in the database configuration it determines whether the configuration has been changed recently, and will force a configuration refresh on the client if necessary. However, in some cases of transient failures these checks may result in a high burden for the database. This option may place a limit of frequency of these checks to avoid it. The default value is 00:00:00, meaning that the check will be performed every time a database configuration error is detected.

Duration

Security

All public RBS views, stored procedures and functions are part of the mssqlrbs RBS schema. The RBS auxiliary tables are configured so that they are not accessible to users directly and can only be accessed using views and stored procedures.

The following roles are created to use RBS functionality. Users can be assigned to these roles to be able to run RBS applications.

db_rbsreader: Can read RBS blob data, cannot insert new blobs or remove references to existing blobs.

db_rbswriter: Can read RBS blobs, insert new RBS blobs and remove references to existing RBS blobs. Can change collection configuration.

db_rbsadmin: Can change RBS configuration for the whole database and for BLOB stores. Can access views exposed for administrative purposes.