Upgrade the databases

Version: 10.5

Depending on which version of Sitecore XP you are upgrading from, you must upgrade some existing databases and deploy some new ones.

Upgrade the existing databases

The database upgrade scripts contain the changes that must be applied to the Sitecore databases to align them with the new version. They also modify certain tables and collections to support new functionality and improve performance. The changes must be applied once per database.

Before you upgrade a database:

  • Read the instructions for the database that you want to upgrade.

    You may need to run the scripts in a certain sequence, or to perform some manual actions.

  • If you need to upgrade a database, extract the database upgrade scripts from the Database Upgrade Script.zip file that you downloaded earlier.

Deploy the new databases

When you install the new instance of Sitecore XP, all the databases are deployed with the correct connection strings and with least privileged users.

If you want to deploy the new databases manually, extract the appropriate DACPAC file from the WDP files. When you deploy a new database, you must also update the connection string for the appropriate Sitecore role and restrict access to the database.

Restrict access to the database

To restrict access to the database, you must create a user with limited access rights (a least privileged user) and specify this user in the connection string. If you do not have a least privileged user in the existing databases, you must create one. You can see an example of a script that creates a least privileged user in Appendix A: Scripts.

There are sample scripts for creating users for each database in the WDP packages.

Since Sitecore XP 10.1.0 all databases are deployed with least privileged users by default.

If you have suggestions for improving this article, let us know!