How To: Completely Re-sync Data with the Cache Builder in the Cireson Portal

Overview

Sometimes for troubleshooting, it is recommended to re-sync data with the Cache Builder from SCSM to the Cireson ServiceManagement Database, please follow the steps below:

  • Stop the Cache Builder service
  • Run this SQL query against ServiceManagement:

TRUNCATE TABLE LastModified

  • Start the Cache Builder service

The Cache Builder performs updates based on timestamps found in the LastModified table. Simply put the Cache Builder re-syncs a delta of information that it needs.

Keep in mind that this won't remove data that isn't present in Service Manager, you may need to manually remove this data with one of the following methods

Completely Re-sync your Enumerations

In order to completely delete all enumerations brought in by the cache and force a refresh, run this against your ServiceManagement db:

DELETE DisplayString WHERE ElementID IN (SELECT EnumerationID FROM Enumeration WHERE CreatedBy = 'c6745a66-5ccc-4fbc-b1d8-ab9797cdea2d');
DELETE Enumeration WHERE CreatedBy = 'c6745a66-5ccc-4fbc-b1d8-ab9797cdea2d';
TRUNCATE TABLE LastModified;

Then restart the Cache Builder.

Important: If you've disabled any enumerations, they may be re-enabled as a result as a result of running these procedures.

Completely Re-sync your Service Offerings and Request Offerings

In order to completely re-sync your Service Offerings and Request Offerings, run this against your ServiceManagement database:

TRUNCATE TABLE LastModified;
TRUNCATE TABLE ServiceOffering;
TRUNCATE TABLE RequestOffering;

Then restart the Cache Builder. If you are truncating these tables to ensure that your Service Offerings and Request Offerings update, you may also need to recycle the application pool and restart the website in IIS.

Important: This will remove the popularity settings from Request Offerings.
Important: This will temporarily remove all Service and Request Offerings from the portal until the Cache Builder rebuilds them.

How to Remove Work Items that no longer exist in ServiceManager

If you have removed work items from the Service Manager database (either using Powershell or other method) they may still appear in the Cireson Portal. Use the following scripts to fix this issue.

Option 1: Selectively delete work items from the cache. Replace IR123 with the WorkItemId of the work item you wish to remove.

DELETE WorkItem WHERE WorkItemId = 'IR123'

Option 2: Probably the easiest to remove all at once.

TRUNCATE TABLE LastModified;
TRUNCATE TABLE WorkItem;

Then restart the Cache Builder.

A user has been changed or removed from Service Manager or AD, but they are still appearing in the portal. What do I do?

First, stop the Cache Builder service and then run the following commands against the ServiceManagement DB:

TRUNCATE TABLE CI$User
TRUNCATE TABLE CI$DomainGroup
TRUNCATE TABLE LastModified

Then restart the Cache Builder service.

Important: This will prevent access for a short time until the Cache Builder has been completely restarted.

Why is my Request Offering image changes not reflected on the Portal after Cachebuilder restart?

The Cireson Portal website is set to cache all Service Catalog images so if you have found that after making a change to an existing request offering you may need to follow the below steps to clear these cached images for the changes to be reflected in the portal.

Step 1: Run this command in ServiceManagement Database:

TRUNCATE TABLE LastModified;

Step 2: Restart the Cachebuilder

Step 3: Restart the CiresonPortal Website in IIS

Step 4: Recycle the CiresonPortal web application pool in IIS

Step 5: You may need to clear your browser cache locally on each machine