Upgrade identity server as part of main upgrade


I wanted to quickly share one of my experiences from an upgrade of Sitecore 9.3.0 to 10.1.2. When performing the upgrade, it is easy to overlook some changes and SQL scripts that need to be run in parallel to upgrade identity Server as part of main upgrade.

The issue we faced

After upgrading to Sitecore 10.1.2 and deploying a new version of Sitecore Identity server, we were faced with exceptions as below:

An unhandled exception has occurred while executing the request.
Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'ConsumedTime'.
Invalid column name 'Description'.
Invalid column name 'SessionId'.

Further analysis of the databases from 9.3 and 10.1 installations showed:

  • SC9.3 CORE database the table IS MISSING the above mentioned columns.
  • SC10.1 CORE database the table CONTAINS the above mentioned columns.

The solution

If you are familiar with the sitecore upgrade process, you will know some of the common steps involved. After preparing the solution and installing the prequisities, you need to then focus on the sitecore databases. You either need to install new databases (from dacpac) or run SQL upgrade scripts to bring old databases inline with the new product.

In the upgrade guide for 10.1.2, it provides a list of scripts that you need to perform. Included in this list is one for the Core database CMS_Core.sql. You might incorrectly assume that this is the only one you need to run against the core database, given that its the only one mentioned in the upgrade guide.

However, afer some head scratching, we realised that we had in fact overlooked the fact that we need to follow the upgrade guide for Identity Server as well as the main guide https://dev.sitecore.net/Downloads/Sitecore_Identity/6x/Sitecore_Identity_600.aspx . Within that guide is a scripts called CMS_security_IdentityServer.sql which adds the columns refered to in our exception above.


In my opinion, the upgrade guide is slightly confusing. It states that you should upgrade the database, deploy a vanilla 10.1 site (which includes a fresh version of the identity server for 10.1). Then reconnect your upgraded databases to the your new installation. The guide states:

The latest version of Sitecore Identity server is installed with Sitecore XP 10.1.0. Update the connection string to point it to the database you work with.


It goes on to say that you need to recompile any custom modifications etc. But it doesnt say you need to follow the upgrade guide for Identity Server. Its easy to assume that the new installation, together with the upgraded core database from the upgrade guide would suffice.

Leave a Reply

Your email address will not be published. Required fields are marked *