Do you already know that the Sitecore Commerce PS Uninstall is not clean?

The Sitecore uninstallation using Uninstall-SitecoreConfiguration cmdlet in the PS script  removes the following:

1. Commerce Services, app pool and file system

2. Commerce-specific DBs

But, looks like it doesn't delete the rows in Master and Web DB Items tables responsible for displaying the storefront. Here is some proof -

One of the prime use cases of the Sitecore Commerce Install Assistant (SCIA) is clean uninstall so that re-install can happen without any errors. So, had to take a step backward and perform uninstall using the Uninstall-SitecoreConfiguration cmdlet in the PS script. As part of the analysis, started investigating the Sitecore backend database table row counts and that is what this blog covers.

After Sitecore SXA Install:

Here is the count of rows prior to Sitecore Commerce or after SXA Site install:

Note that after this install, its obvious that you wouldn't find any items named storefront or habitat since this is a fresh install.

After Sitecore Commerce Install:

a. Here is the total count of rows:

An increase in count of about 400 rows in Core.Items, 7000 rows in case of Master.Items and 15000 rows in case of Web.Items tables.

b. Here is the count of rows with "habitat" and "storefront" sub-strings. These sub-strings weren't available prior to Commerce installation -


After Sitecore Commerce Uninstall:

Just uninstalled Sitecore Commerce and checked the count of rows.

a. Here is the total count of rows:


b. Here is the count of rows with "habitat" and "storefront" sub-strings:


Since there is no difference in the row counts before and after commerce uninstall, I would safely assume that the uninstall didn't remove rows from the backend. Now, let's re-install commerce on the same instance and see the effect.

After Commerce Re-install: Note that the re-install was done by skipping the habitat images and adventureworks modules as per my other blog.

a. Here is the total count of rows after re-install:


For reasons unknown, note that the row count in the Core DB alone has increased by 2.

b. Anyway, here is the count of rows with "habitat" and "storefront" sub-strings:


So, no change in row count except the core db items count.

Now, this blog is about what other tasks can be cut-down or skipped as part of the re-install. As far as I analyzed, the rebuild indexes involved with Master and Web databases can be safely skipped during re-install since the master and web databases seem unaffected by the uninstall.

The advantage of this skipping is installation time gain since the re-install gets finished in about 20 mins compared to 40 mins of full Commerce installation and not to forget the uncertainty/errors involved.

So, next time, if you are trying re-install of Sitecore Commerce instance, add these tasks to the $TasksToSkip param and see how the re-install goes. 

[string]$TasksToSkip = "Module-HabitatImages_InstallWDPModuleMasterCore,Module-HabitatImages_InstallWDPModuleMaster,Module-HabitatImages_InstallWDPModuleCore,Module-AdventureWorksImages_InstallWDPModuleMasterCore,Module-AdventureWorksImages_InstallWDPModuleMaster,Module-AdventureWorksImages_InstallWDPModuleCore,RebuildIndexes_RebuildIndex-Master,RebuildIndexes_RebuildIndex-Web"


 

Comments

  1. Discover premier web development services in Austin with Kusheldigi Solutions. Our expert team delivers custom websites, e-commerce solutions, and mobile apps tailored to your business needs. Experience innovation, quality, and exceptional user experiences with Kusheldigi Solutions, your trusted web development agency in Austin. Web development agency in Austin

    ReplyDelete

Post a Comment