---
title: "Appendix B – Generating shard keys and missing percentile values"
slug: "appendix-b---generating-shard-keys-and-missing-percentile-values"
abstract: ""
---
# Appendix B – Generating shard keys and missing percentile values

This appendix applies if the *Collection* database is on SQL Server and the [AlwaysEncrypted](https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-database-engine?view=sql-server-2017) feature is not configured. For more information, see the section about the xDB *Collection* database for the upgrade path you are following.

When you update the SQL *Collection* schema from version 9.2.0 or earlier, the shard key values are null by default. Earlier upgrades to version 9.2.0 might result in percentile value being less than 0.

We recommend that you replace the default values of the shard key and the percentile with the value that is calculated based on row ID.

The *Sitecore Xdb Collection Update* tool is used to generate shard keys and missing percentile values from record IDs. These values are calculated from row IDs (usually from contact ID).