Tagged: Sitecore 10

Sitecore Upgrade: Database Scripts

sitecore-upgrade-xm-database-scripts-hero-2.png

In the previous post, we discussed 

  1. Installing a vanilla instance of Sitecore XM 10.3
  2. Sitecore Upgrade: The UpdateApp Tool

I’m upgrading from Sitecore 9.3 to 10.3 instance and as part of the upgrade process, let’s run the Databases scripts.

Before running the scripts, we need to clone the existing project databases and restore them to run the scripts.

Let’s go –

Database Clone

Clone Core, Master, Web, and Experience Forms databases of your Sitecore local 9.3 instance. 

Let’s back up the database –

Save the .bak file and rename it to  _Clone at the suffix (Your_Project_Core_Clone).

Repeat the process for all four databases.

Database Restore

Restore all four cloned databases.

 

Download the Upgrade scripts

Navigate to Sitecore Downloads: Sitecore Experience Platform 103

Download the Configuration files for upgrade <Sitecore 10.3.0 rev. 008463 (upgrade files).zip>

 

sitecore-upgrade-xm-database-download-1.png

 

Extract the Sitecore 10.3.0 rev. 008463 (upgrade files).zip file

Scripts Mapping

Now we bunch of files in the extracted folder. We don’t need to run all scripts, Sitecore has given a chart for each Sitecore version upgrade with a list of scripts to run. I’m upgrading from Sitecore 9.3, below is the list of scripts I need to run against clone databases.

  • Script A – CMS_core_master_web8x.sql
  •  Script B – CMS_core_master_web9x.sql
  •  Script C – CMS_core.sql
  •  Script D – CMS_master.sql
  •  Script E – CMS_web.sql
  •  Script F – SXP_experienceforms_storage.sql
  •  Script H – CMS_security.sql

Core DB: 

Run the Scripts C (CMS_Core.sql) for [Your_Project]_Core_Clone DB

<<CMS_core.sql>>

Run the Script H(CMS_Security.sql) against [Your_Project]_Core_Clone DB since I have a separate Security DB connection string. 

<<CMS_security.sql>>

Master DB

Run the Scripts D (CMS_Master.sql) for [Your_Project]_Master_Clone DB 

<<CMS_master.sql>>

Web DB

Run the Scripts E (CMS_Web.sql) for [Your_Project]_Web_Clone DB

<<CMS_web.sql>>

Experience Forms DB

Run the Script F (SXP_experienceforms_storage.sql) for [Your_Project]_ExperienceForms_Clone DB

<< SXP_experienceforms_storage.sql s>>

 

Now we ran all the upgrade scripts, let’s update the connection string of vanilla Sitecore 10.3 XM to Cloned databases. 

Update the ConnectionString of Sitecore 10.3 XM Instance:

 <<ConnectionStrings.config>>

Let’s point to the Clone Databases by updating Initial Catalog and Password.

 

<add name=”core” connectionString=”Data Source=(local);Initial Catalog=[Your_Project]_Core_Clone;User ID=coreuser;Password=[Your_Password]” />

<add name=”security” connectionString=”Data Source=(local);Initial Catalog=[Your_Project]_Core_Clone;User ID=securityuser;Password=[Your_Password]” />

<add name=”master” connectionString=”Data Source=(local);Initial Catalog=[Your_Project]_Master_Clone;User ID=masteruser;Password=[Your_Password]” />

<add name=”web” connectionString=”Data Source=(local);Initial Catalog=[Your_Project]_Web_Clone;User ID=webuser;Password=[Your_Password]” />

<add name=”experienceforms” connectionString=”Data Source=(local);Initial Catalog=[Your_Project]_ExperienceForms_Clone;User ID=formsuser;Password=[Your_Password]” />

 

Now load the Sitecore 10.3 XM Instance and got the Sitecore login screen.

Hope this helps.

Happy Sitecoring!

 

0

Sitecore Upgrade: The Update App Tool


sitecore-upgrade-updateapp-tool-default-items-cleanup-hero.png

 

In the previous post, we discussed the process of installing a vanilla instance of Sitecore XM 10.3.

I’m upgrading from Sitecore 9.3 to 10.3 instance and need to run the Database Upgrade scripts as part of the upgrade process. 

Before running the DB upgrade scripts, need to run a new tool that Sitecore has introduced – 

The Sitecore UpdateApp Tool

  • It is a standalone console tool 
  • Use this tool only if you are upgrading to 10.1.0 or later

The default items have been moved into resource files, the tool will remove them from your databases. (if they have not been modified) from the Core, Master, and Web databases.

  • If you have modified any of the default items, they are not removed and the tool adds a list of these items to its log file.
  • Sitecore recommends that you review this list and decide if you still need the modifications, and re-apply your customizations to the new items after you have deleted the old ones.
  • If you decide that you don’t need the modifications, delete these items from SQL databases.
  • That default content would come from the actual items resource file which will be placed in App_Data\Items.
  • If your solution contains any modules or connectors, you should use this tool to upgrade them.

Database Clean-up:

  • It is a one-time operation, run before running the Sitecore UpdateApp tool

To clean up the content databases:

On the Sitecore Launchpad, open the Control Panel, click Clean up databases, select all the databases, and then click Clean.

sitecore-updateapp-tool-default-items-cleanup-1

It will take some time. Once it succeeds, let’s move to the next step.

Sitecore.UpdateApp Tool:

Download the tool from Sitecore Downloads: Sitecore UpdateApp Tool

I navigated to Sitecore.UpdateApp 1.3.1 page since I’m upgrading it to Sitecore 10.3. The following chart shows which version of the tool you should utilize. 

sitecore-upgrade-updateapp-tool-default-items-cleanup-2

 

Inside the tool page, you must download the package for the version of Sitecore that you are upgrading from. This file contains the clean-up tool.

Since I’m upgrading from 9.3, I choose Sitecore 9.3 XP.

  • Download the Sitecore.UpdateApp 1.3.1 for Sitecore 9.3.0 rev. 003498 (XP).zip

sitecore-upgrade-updateapp-tool-default-items-cleanup-3

 

  • Extracted the content to C:\Sitecore_103_Upgrade\Sitecore.UpdateApp

sitecore-upgrade-updateapp-tool-default-items-cleanup-4.png

  • Copy the license file to the Data folder of the tool 
    • C:\Sitecore_103_Upgrade\Sitecore.UpdateApp\Data\license.xml.

sitecore-upgrade-updateapp-tool-default-items-cleanup-5

  • Update the databases (cloned or actual – depends upon how you are upgrading) in the ConnectionString file
    • C:\Sitecore_103_Upgrade\Sitecore.UpdateApp\App_Config\ConnectionStrings.config

<add name="core" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Core_Clone;User ID=coreuser;Password=[Your_Password]" />

<add name="security" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Core_Clone;User ID=securityuser;Password=[Your_Password]" />

<add name="master" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Master_Clone;User ID=masteruser;Password=[Your_Password]" />

<add name="web" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_Web_Clone;User ID=webuser;Password=[Your_Password]" />

<add name="experienceforms" connectionString="Data Source=(local);Initial Catalog=[Your_Project]_ExperienceForms_Clone;User ID=formsuser;Password=[Your_Password]" />

Sitecore Modules

Sitecore Downloads: Resource files for Modules

Add the upgrade resources from every module and connector to the UpdateApp Tool files.

Note: If your solution does not contain any modules or connectors, skip this step.

I downloaded the Sitecore Headless Services and SPE modules for my project.

sitecore-upgrade-updateapp-tool-default-items-cleanup-6

 

Note: 

If the module or the connector has several versions, there are separate folders for each version.

  • Unpack the zip file into a local folder
    • C:\Sitecore_103_Upgrade\ModulesUpgradeResources\[Module Name].

sitecore-upgrade-updateapp-tool-default-items-cleanup-7

  • Copy all the subfolders and files from the Data folder.

    • C:\Sitecore_103_Upgrade\ModulesUpgradeResources\[Module Name]\X.X.X\Data.

  • Paste all the subfolders and files into the UpdateApp Data folder.
    • C:\Sitecore.UpdateApp\Data.
  • Repeat this procedure for every module and connector.
  • Open a Command Prompt in the tool folder and run: Sitecore.UpdateApp.exe clean

sitecore-upgrade-updateapp-tool-default-items-cleanup-8

  • Review the logs, to make sure all items are cleaned up.

    • C:\Sitecore_103_Upgrade\Sitecore.UpdateApp\Data\logs

sitecore-upgrade-updateapp-tool-default-items-cleanup-9

  • To clear the caches, open the <instance_url>\sitecore\admin\cache.aspx page,
    click Refresh, and then click Clear all.

 

Troubleshooting

1. Exception: Execution Timeout Expired

sitecore-upgrade-updateapp-tool-default-items-cleanup-10

If you receive this error, increase the SQLTimeout in Sitecore.config of Sitecore.UpdateApp Tool.

The default is 5 minutes, increase it to 30 minutes and run the UpdateApp Tool again.

   <setting name=”DefaultSQLTimeout” value=”00:30:00“/>

sitecore-upgrade-updateapp-tool-default-items-cleanup-11

 

2. The type initializer for ‘Sitecore.SecurityModel.License.LicenseManager’ threw an exception.

Verify that the correct license file is copied to the Data folder of the tool.

 

3. System.InvalidOperationException: Connection string is empty. Name: ‘<database name>’

Verify that the ConnectionStrings.config file is in the App_config folder of the UpdateApp.The content contains the correct connection strings.

If you do not use a separate security database, the security connection string must have the same value as the core connection string.


In the next blog, we will talk about the Sitecore Upgrade: Database Scripts.

Hope this helps. Happy Sitecoring!

3

Quickly Setup Sitecore 10.3 XM with SIA

The latest version Sitecore 10.3, is packed with new features and enhancements that make it easier than ever to manage your digital content and deliver personalized experiences to your customers.

If you’re looking to install Sitecore 10.3 XM, one of the easiest ways to do it is by using the Sitecore Install Assistant (SIA). In this blog post, let’s walk through the steps to install Sitecore 10.3

Prerequisites:

  • A Windows machine with a minimum of 16GB of RAM
  • Microsoft SQL Server 2017 or later
  • IIS 10 or later
  • .NET Framework 4.8 or later
  • Microsoft PowerShell 5.1 or later

Preparation:

  • Download the installation package (Graphical setup package XM scaled) from here.

Sitecore_10_3_Installation_XM_Headless_Download

Installation:

  • Extract the downloaded zip file

Sitecore_10_3_Installation_XM_Headless_Setup_exe

  • Right-click on the Setup.exe and execute in Administrator mode

Sitecore_10_3_Installation_XM_Headless_Start

  • Install the prerequisites 

Sitecore_10_3_Installation_XM_Headless_Prerequisites.png

  • Install Solr 8.11.2 by entering the Port, Windows service path prefix, and Install path

Note: Make sure the port number differs from earlier Solr-installed versions. Check out my blog to discover which processes are using which ports – https://madhuanbalagan.com/sitecore-10-sif-installation-roadblocks

  • Solr installation is successful!

Sitecore_10_3_Installation_XM_Headless_Solr_Complete.png

  • Fill out the Site prefix, admin password(going with bso easy to remember), and choose the Sitecore license file

Sitecore_10_3_Installation_XM_Headless_Sitecore_Settings.png

  • Fill out the SQL server Instance name, admin username, and password.

Sitecore_10_3_Installation_XM_Headless_SQL_Server_Settings-1.png

  • It auto-fills Solr URL, System root, and Windows service name

Note: Navigate to Solr URL and ensure it’s running as expected

Sitecore_10_3_Installation_XM_Headless_Solr_Settings.png

  • Select the optional module if you plan to create a Headless SXA site

Sitecore_10_3_Installation_XM_Headless_SXA.png

  • Review the summary to make sure the settings are correct

Sitecore_10_3_Installation_XM_Headless_Summary.png

  • The Installation wizard in SIA validates all the settings before starting the install

Sitecore_10_3_Installation_XM_Headless_Validate.png

  • Installation takes around 10-15 minutes (you can get a coffee!). If it errors out, check out the log.

Sitecore_10_3_Installation_XM_Headless_Install.png

Yayy! It’s successfully installed. Is it easy to install with SIA? It’s indeed a great tool!

Sitecore_10_3_Installation_XM_Headless_Install_Completed.png

Let’s log in and explore!

Sitecore_10_3_Installation_XM_Headless_Login_Success.png

 

Roadblocks:

Error # 1: Solr access to the path denied

Solr installation failed with error – Access to the path ‘C:\Users\MANBAL~1\AppData\Local\Temp\solr-8.11.2\server’ is denied.

Sitecore_10_3_Installation_XM_Headless_Rendering_Error.png

 

Resolution:

I wasn’t running at the setup.exe in Admin mode. Ran in Admin mode (restarted the machine just in case) fixed the issue.

 

Error # 2: Unable to create core index

Error CREATEing SolrCore Unable to create core [wc10.3.xm.local_core_index] Caused by: Can’t find resource ‘solrconfig.xml’ in the classpath or ‘C:\Solr\Solr.8.11.2solr-8.11.2\server\solr\sc10.3.xm.local_core_index’

 

Resolution:

Do not use the same port used for the earlier installation. For some reason, it doesn’t work. Always use the new port and new Solr instance name.


Now that we installed Sitecore 10.3 XM, I’ll be installing Sitecore Headless Rendering (previously known as the JSS module) in my next blog post.

Hope this helps. Happy Sitecoring!

3

My 2022 Reflections

2022 has been a good year so far – I traveled to India and Chicago for the Sitecore Symposium. Lots of learning and fun!

Presentations:

Blog Posts :

Certifications:   

  • Feb 2022 – Sitecore OrderCloud Certification
  • Apr 2022 – Sitecore 10 System Administrator Certification
  • May 2022 – Sitecore CDP and Personalize Certification

Co-organized SUG-Pittsburgh Meetups :

Co-organized SUG-QueenCity Meetup :

Conferences I attended:

  • Sitecore Symposium
  • Virtual Developer Day
  • MVP Sitecore Lunches
  • All SUG Pittsburgh and Queen City meetups 
  • Many SUG Boston/ Columbus/ Atlantic meetups  

Plans for 2023 :

Learn and contribute:

  • Composable DXP
  • Sitecore Send
  • Sitecore CDP and Personalize

Co-organize :

  • Monthly SUG-Pittsburgh meetup
  • Monthly SUG-QueenCity meetup

Present:

  • Sitecore Virtual Developer Day
  • SUGCON EU/Symposium
  • SUG Meetups

Happy Sitecoring!

1

My 2021 Reflections

Hope everyone got the Covid-19 vaccines and staying safe.  

Here are my contributions for the year – 

Presentations:

Blog Posts :

Award :

  • Experience Awards 2021 (Honorable Mention)  

Certification:   

  • Sitecore 10 .NET Developer Certification  

Contributions :

  • Logged Sitecore Bugs  
    •  CS0208574 Forms are missing in Forms Designer View
    •  CS0206915 High memory utilization on xConnect/Solr server 

Conferences I attended:

  • Symposium
  • SUGCON  
  • Virtual Developer Day
  • MVP Sitecore Lunches  
  • All Pittsburgh SUG meetups 
  • Most of the SUG Boston/ Queen City/ Columbus meetups  

Co-organized SUG-Pittsburgh Meetups :

Co-organized SUG-QueenCity Meetup :

 

Plans for 2021 :

Learn and contribute:

  • Sitecore 10.2
  • Composable DXP
  • Containerization
  • Sitecore Saas Offerings

Co-organize :

  • Monthly SUG-Pittsburgh meetup
  • Monthly SUG-QueenCity meetup

Presentations:

  • Sitecore Virtual Developer Day
  • SUGCON EU/Symposium
  • SUG Meetups

Happy Sitecoring!

 

0

Sitecore 10 SIF Installation Roadblocks

Sitecore_10_Installation_Roadblocks

Sitecore 10 was out a couple of months back. I installed it using SIF, hit a couple of roadblocks while installing and sharing the resolutions that helped resolve the issues.

If you haven’t installed Sitecore 10, here are some blogs that help you install.

Sitecore 10 using SIF: https://scorewow.wordpress.com/2020/08/05/install-sitecore-10-in-10-using-sif/

Sitecore 10 using SIA: https://madhuanbalagan.com/installing-sitecore-10-using-sia

 

Error # 1: Solr Port Issue

I have multiple Solr services running for different versions of Sitecore and here is the error I got while installing Sitecore 10.

“Port 8984 is already being used by another process. Please choose a different port”.

Run services.msc to check how many Solr’s are running on the machine.

Resolution:

If you have multiple instances of Solr running and you don’t know what port, it’s associated with. Here is a quick way to get the process name and kill if it’s is no longer needed.

Find which process using Solr port

 

Get-Process -Id (Get-NetTCPConnection -LocalPort $portNumber).OwningProcess

Sitecore_10_Installation_Find-_Which_Process_Using_Solr_Port

Also when installing the Solr, you can add the Port Name and Sitecore Version number or any information in the Description of Details tab.

This is life saver, do not need to worry about which Solr maps which port in the future!

 

Sitecore_10_Installation_NSSM_Service

 

Sitecore_10_Installation_Service_List

 

Error # 2: SQL User Issue

“msdeploy.exe : Error: .Net SqlClient Data Provider: Msg 12809, Level 16, State 1, Line 5 You must remove all users with password before setting the containment property to NONE.                                                            At C:\ProgramFiles\WindowsPowerShell\Modules\SitecoreInstallFramework\2.2.0\Public\Tasks\Invoke-CommandTask.ps1:31 char:13”  

                                                    

Resolution:

For some reason, the SC10 uninstall did not remove all the variables for failed instances. I removed the  ‘sc10_CollectionUser’ in local DB users, fixed the issue.

 

Sitecore_10_Installation_SQL_User_Issue_Resolution

 

 

Error # 3: Credential Issue

Sitecore_10_Installation_Error_Credential_Issue

“Install-SitecoreConfiguration: A parameter cannot be found that matches parameter name ‘Credential’. This error might have been caused by applying the default parameter binding. You can disable the default parameter binding in

$PSDefaultParameterValues by setting $PSDefaultParameterValues[“Disabled”] to be $true, and then trying again. The following default parameters were successfully bound for this cmdlet when the error occurred: -Debug -WarningAction

-Verbose -InformationAction -ErrorAction

At C:\ResourceFiles\XP0-SingleDeveloper.ps1:77 char:1

+ Install-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Objec …

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration”

 

Resolution:

The SqlServer module wasn’t installed by default, so I had to do it manually.

Ran this on Powershell command fixed the issue.

Install-Module -Name SqlServer -AllowClobber

 

Hope this helps someone. Any issues, let me know in the comments section.

Happy Sitecoring!

1

Sitecore Horizon 10 Installation

I want to share my experience with the Installation of Sitecore Horizon 10. 

Prerequisites

Before you install Sitecore Horizon, you must:

After you install the tools, restart your machine.

SameSite cookies and custom domains:

The commonly-used browsers such as Chrome and Safari are changing how the browsers interpret the SameSite cookie. After the change takes effect, Horizon will only work if the Sitecore Horizon host instance, the Sitecore identity instance, and the Sitecore CM instance belong to the same site. 

Sitecore CM: https://cm.mycompany.com
Sitecore identity: https://si.mycompany.com
Horizon: https://horizon.mycompany.com

Installation

  • Download Horizon 10 from here. I downloaded the on-premises deployment.  

  • Extract the zip file and open InstallHorizon.ps1

  • Fill out the below parameters –

  • Run the InstallHorizon.ps1 in Adminstrator mode.



  • Once the installation is done (only takes 2 to 3 minutes), you will see a new Icon in Sitecore XP.



  • Clicking the Icon opens Horizon (yes, it’s separate IIS site) in a new tab and you can explore the new features!

Post Installation

To use the alignment and indentation features in the rich text editor in Horizon, make sure to add the below styles to your default style sheet (like default.css in your project).

.rte-indent-1 {
     padding-left: 40px;
}
 .rte-indent-2 {
     padding-left: 80px;
}
 .rte-indent-3 {
     padding-left: 120px;
}
 .rte-indent-4 {
     padding-left: 160px;
}
 .rte-indent-5 {
     padding-left: 200px;
}
 .rte-indent-6 {
     padding-left: 240px;
}
 .rte-indent-7 {
     padding-left: 280px;
}
 .rte-indent-8 {
     padding-left: 320px;
}
 .rte-align-center {
     text-align: center;
}
 .rte-align-justify {
     text-align: justify;
}
 .rte-align-right {
     text-align: right;
}

Hope this helps someone. Any issues, let me know in the comments section.

Happy Sitecoring!

0

Installing Sitecore 10 using SIA(Sitecore Install Assistant)

Sitecore 10 is out! I tried installing it using SIA(Sitecore Install Assistant) along with SXA and it installed smoothly without any errors!

Prerequisites: 

No need to install any prerequisites(includes Solr, SIF) manually, SIA will take care of it.

Preparation:

  • Download installation package (Graphical setup package XP Single) from here.

Installation:

  • Extract the file zip file downloaded and click on Setup.exe
  • Install the prerequisites to make sure the required SIF and Windows Server prerequisites are up to date.
  • Install Solr 8.4.0 by filling Port, Windows service path prefix and Install path and Install.

Note: Make sure the port number is different from earlier versions of Solr installed. 

  • Fill out site prefix, admin password (going with b, so easy to remember) and Confirm password (new to Sitecore 10), and license file path.
  • Fill out SQL server instance name, admin username and password.
  • Double-check the Solr URL (browse to make sure it’s running successfully), System root and Windows service name
  • Select optional module SXA if you need. I’m going for it, time to explore SXA! Would be nice if Horizon is listed here.
  • Review the summary to make sure the settings are correct.
  • SIA validates to make sure the files look good.
  • Install. This takes around 10 minutes (you can get a coffee!). If it errors out, check out the log.

Yayy!! It’s installed. Is it easy to install with SIA? It’s indeed a great tool!  

Check out the release notes for what’s new in Sitecore 10.

Error:

While installing got this error –

Failed to start service ‘Sitecore Marketing Automation Engine – sc10.xp.dev.localxconnect.dev.local- MarketingAutomationService (sc10.xp.dev.localxconnect.dev.local- MarketingAutomationService)’.

Failed to start service Sitecore Marketing Automation 
MarketingAutomationService

Failed to start service Sitecore Marketing Automation – MarketingAutomationService

Resolution:

This could be due to a license expiry issue. In my case, I had a valid license file. Resolved the issue by moving the non-self signed certificates to trusted certificates. 

I ran this command as an admin and got a couple of certificates that were non-self signed.

Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_Subject }

Now I moved it to Trusted Root by running the following command.

Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_Subject } | Move-Item -Destination Cert:\LocalMachine\CA

 Failed to start service Sitecore Marketing Automation Engine

Moved Non-Self Signed Certificates to Trusted Root

After moving, I tried the SIA again and it worked perfectly.

Happy Sitecoring!

2