My Sitecore Upgrade Learnings Part 1

Hello Everyone, In this blog I will share my learnings and experience while working on Sitecore upgrade project. Recently we migrated our Sitecore solution from 9.2 with SXA to Sitecore 10.2 with SXA. I will also share my experience regarding what was our approach to implement the same.

Sitecore already have a very good document which clearly explains what is needed to upgrade the Sitecore version. If you are upgrading from version prior to Sitecore 9 that this blog will not be that much useful but still you can refer this for some learning purpose.

So let's get started. We were having a Sitecore managed cloud in 9.2 with compatible SXA 1.9 installed on it. We started with following approach mentioned below.

  • We got a new Sitecore Manage cloud instance with 10.2 version
  • We installed the Compatible Sitecore PowerShell (6.3 IAR) and SXA version (10.2.0) with respect to 10.2
  • After successful installation on CM environment, we required to deploy respective SXA modules on CD environment. We copy pasted the CD specific web deployment package i.e. WDP downloaded from Sitecore KB page.
  • Once this part is done, we restored the 9.2 respective databases on the new environment. We took the backup from the old 9.2 environment and restored it in 10.2 environment
  • After restoring, there are few steps which is must to be executed
    1.  Run the SQL Upgrade scripts provided by Sitecore for specific databases. (Sitecore upgrade docs, it is clearly mentioned which script should be executed. 
    2. Once you have run all the scripts, on required databases, then start changing the user passwords on Databases. For this refer your connection string on all the app services like CM, CD, Reporting etc. Make a note of it and then according to the user defined in connection string update the user password in respective databases. Below is the query for the same.  ALTER USER ['{username}'] WITH PASSWORD=N'{password}', DEFAULT_SCHEMA=[dbo] GO
    3. Use Azure SQL query editor to update the passwords. If any app service is using any user which is not available in that respective database, then we need to create the same user. You can use query for the same. USE [{database}] GO CREATE USER ['{username}'] WITH PASSWORD=N'{password}', DEFAULT_SCHEMA=[dbo] GO
    4. Once, this task is successful login each database with that user and password and verify whether authentication is successful or not through SSMS.
    5. Now rename the 9.2 databases to 10.2 databases and rename the 10.2 default databases as backup or as per your wish
    6. Update database and server name in table [__ShardManagement].[ShardsGlobal] with proper SHARD0 and SHARD1 database name in SMM Database
    7. Update the Shard locals table in Shard0 and Shard1 database with proper database and server name

You can refer below screenshots.

Now Launch you upgraded Sitecore instance. As soon as you check, there will be upgrade button available on you default Home item. Once you clicked on that button, the page list view grid will open to show all the content that will be updated. Click each item and one by one for upgrade. Kindly refer below screenshot.

After successfull upgrade there will be no items shown in the list.

Populate the schema and rebuild the indexes. Rebuild the link databases from Sitecore control panel

Our Sitecore instance is upgraded to required version.

This blog only coveres the Sitecore aspect of the upgrade in next part we will see the code update required for the same.

Issues Encountered:

  • If you get issues while SOLR while rebuilding : example field missing which contain id or _datasource: Populate the schema and then rebuild again that index.
  • While upgrading the SXA if you get issue PowerShell v6.3 Type "Cognifide.PowerShell.Client.Controls.IsePluginStrip, Cognifide.PowerShell" not found : From this github link https://github.com/SitecorePowerShell/Console/releases Download the Sitecore.PowerShell.Extensions-6.4.zip and override the existing powershell module installed
  • Sync Token no longer valid issue : Refer below sitecore stack exchange link for reference https://sitecore.stackexchange.com/questions/13263/getting-exception-sync-token-is-no-longer-valid-for-contacts-interactions
  • Getting full url with root node in Sitecore : Check enable preview option setting in Site grouping
  • Error while running SXA script throwing exeception (Error while executing 'Spe.Commands.Interactive.ShowResultsCommand' command Exception: System.Threading.ThreadAbortException Message: Thread was being aborted. Source: mscorlib at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort() at Sitecore.Jobs.AsyncUI.MessageQueue.GetResult() at Spe.Commands.Interactive.Messages.BasePipelineMessageWithResult.GetResult() at Spe.Commands.Interactive.ShowResultsCommand.b__16_0() at Spe.Commands.BaseCommand.LogErrors(Action action) ManagedPoolThread #9 20:01:38 ERROR Error while performing timed 'script execution in ScriptSession '$scriptSession$|03ba3gdungvdz4we0edvdla3|ef83c00d-fd35-4c74-a318-cc82fb2b27b0'' operation within 1816239 ms. Exception logged at operation origin point. ManagedPoolThread #9 20:01:38 ERROR Script was aborted) : Check Identity login Sitecore SI config in Identity server have different hash algorithm from other app service (It should be same)

Hope this blog will help you in one or other way. Thanks for reading.!!

Happy learning and Happy Sitecoring.

Comments

  1. Seems very useful, Did you also done .Net framework version upgrade from solution end (or any additional step from solution end).

    ReplyDelete
    Replies
    1. Yes, will update that in second part as this blog would have been very long.

      Delete
  2. Everyone appreciates posts on upgrades any day... that too job interviews! i'll aim for one similar post sometime!

    ReplyDelete

Post a Comment

Popular posts from this blog

Automate RSS Feed to Sitecore XM Cloud: Logic App, Next.js API & Authoring API Integration

Create and Fetch Content From Sitecore Content Hub One using GraphQL and React

Sitecore XM Cloud Form Integration with Azure Function as Webhook