Clean up the content databases

Version: 10.5
Note

If you are upgrading from Sitecore XP 10.1.0 or later and your solution does not contain any modules or connectors, skip this section.

Because all the default items have been moved into resource files, you must remove them from your databases.

Database clean-up is a one-time operation.

The Sitecore.UpdateApp tool removes these items, 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 them to its log file. We recommend that you review this list and decide if you still need the modifications. If you still need the modifications, 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, just delete these items from SQL databases.

The Sitecore.UpdateApp is a standalone console tool.

To clean up the content databases:

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

  2. Locate the Sitecore.UpdateApp 1.X.X for Sitecore X.X.X rev XXXXXX.zip file that you downloaded earlier and extract its contents to a folder, for example, C:\Sitecore.UpdateApp.

  3. Copy the license file to the Data folder of the tool, for example, C:\Sitecore.UpdateApp\Data\license.xml.

  4. In the C:\Sitecore.UpdateApp\App_Config\ConnectionStrings.config file, update the connections to your databases.

    If you do not have a security database, use the connection to the core database.

  5. 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.

    You can download the upgrade packages for the different versions of the Sitecore modules from the Sitecore downloads site.

    1. Download the items as resources ZIP file for the module version that is installed on your solution. If the module or the connector has several versions, there are separate folders for each version.
    2. Unpack the ZIP file into a local folder, for example, C:\ModulesUpgradeResources\[Module Name].
    3. Copy all the subfolders and files from the Data folder, for example, from C:\ModulesUpgradeResources\[Module Name]\X.X.X\Data.
    4. Paste all the subfolders and files into the UpdateApp Data folder, for example, C:\Sitecore.UpdateApp\Data.
    5. Repeat this procedure for every module and connector.
  6. Open a Command Prompt in the tool folder and run:

    Sitecore.UpdateApp.exe clean

    The number of items that are removed from each database is listed in the Command Prompt window.

    SC-XM-Upgrade-Guide-Sitecore-UpdateApp-Clean.png

    Detailed information about any modified items that are skipped is written to the log files in the tool folder – \Data\logs.

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

  8. If you have modified items, you should review and delete them after you install the new Sitecore instance and connect it to upgraded databases, as described in section Connect to SQL databases under the “Complete databases cleanup” heading.

Note

If you have more than one Web database, you must run steps 3 and 4 for every Web database.

You must update the connection string to each Web database as you run the tool, and not change the connection strings to the other databases.

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