---
title: "xDBコレクションデータベースのスケーリングと設定"
slug: "scaling-and-configuring-the-xdb-collection-database"
abstract: "xDBコレクションデータベースのスケーリングと設定の概要。"
---
# xDBコレクションデータベースのスケーリングと設定

xDBコレクションデータベースはすべての接触およびインタラクションデータを保存し、[Content Deliveryロール](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/scaling-and-configuring-content-delivery.html "Scaling and configuring Content Delivery")などのソースからは高い書き込み速度を経験することがあります。xDBコレクションデータベースをスケーリングする前に、以下の役割のスケーリングオプションやパフォーマンスチューニングタスクを確認してください:

-   [xConnect Collection Searchの役割のスケーリングと設定](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/scaling-and-configuring-the-xconnect-collection-search-role.html "Scaling and configuring the xConnect Collection Search role")
-   [xConnect Collectionサービスの役割のスケーリングと設定](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/scaling-and-configuring-the-xconnect-collection-service-role.html "Scaling and configuring the xConnect Collection service role")
-   [xConnect Search Indexerのスケーリングと設定](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/scaling-and-configuring-the-xconnect-search-indexer.html "Scaling and configuring the xConnect Search Indexer")

## xDBコレクションSQLプロバイダーのスケーリングと設定

xDBコレクションSQLプロバイダーには以下が含まれます:

-   シャードマップ管理データベースで、シャードセットに関するグローバルな情報を格納します。
-   シャードセット。

xDBコレクションSQLプロバイダーは以下のスケーリングオプションをサポートしています:

-   シャーディング。 [すべてのデフォルトトポロジーは](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/default-topologies.html "Default topologies") デフォルトで2つのシャードを含み、 [最大18個のシャードでxDBコレクションデータベースを再デプロイ](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/deploy-the-xdb-collection-database.html "Deploy the xDB Collection database")できます。注意点:
    -   連絡先およびインタラクションデータは連絡先IDでシャーブされます。
    -   識別子インデックスは識別子ごとにシャード化されます。
    -   デバイスプロファイルはデバイスプロファイルIDでシャード化されます。
-   Sitecore 9.3以降では、 [シャードを分割・統合](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/split-or-merge-xdb-collection-database-shards.html "Split or merge xDB Collection database shards") してデータを再配布できます。
-   [Always Onを高可用性(HA)に設定してください。](https://doc.sitecore.com/xp/ja/developers/103/platform-administration-and-architecture/walkthrough--configuring-always-on-for-the-xdb-collection-database.html "Walkthrough: Configuring Always On for the xDB Collection database")

### 接続文字列設定のxDBコレクションシャードへのレプリケーション

SQLプロバイダーは実行時にxDBコレクションシャードへの接続を作成する責任を負います。SQLプロバイダーがコレクションシャードへの接続を開く際、接続プ[ーリング](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql-server-connection-pooling)技術を活用して接続開設コストを最小限に抑えます。"collection"接続文字列に[最大プールサイズキー](https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnectionstringbuilder.maxpoolsize?view=dotnet-plat-ext-3.1)が含まれている場合、その設定は複製され、データベースシャードへの接続に適用されます。

Collectionデータベースシャードクラスターで設定可能な接続文字列は、<xconnect-root>\\App\_Config\\ConnectionStrings.configファイルで定義されているシャードマップマネージャーへの接続だけです。

以下は、max pool sizeを200に設定した"collection"接続文字列構成の例を示しています。

<connectionStrings configBuilders="SitecoreConnectionStringsBuilder">
 <add name="collection" connectionString="user id=host\_collectionuser>;password=123;data source=.;Initial Catalog=host\_Xdb.Collection.ShardMapManager;Max Pool Size=200"/>
</connectionStrings>