By default, the Cireson Portal replicates all configuration item classes defined in SCSM to the ServiceManagement database so that all the configuration items are available in the portal. If you only wish to manage a limited number of Configuration Items, the Cireson Portal allows you to define which classes of Configuration Items are available in the interface.
Defining which classes should be replicated.
- Open the portal as an administrator.
- From the dropdown menu in the right-hand corner, select Admin Settings.
- Scroll to the bottom of the page and click on Settings Item.
- The classes are defined using the ConfigItemClasses value. They must be specified as a comma-separated list with no white-spaces before or after the class names.
Listing the Configuration Item Classes
You can find which classes are are available by running this query in SQL Management Studio against the ServiceManager database.
WITH ConfigItemClasses (ManagedTypeId, TypeName, BaseManagedTypeId, [Level])
AS (
SELECT t.ManagedTypeId, t.TypeName, t.BaseManagedTypeId, [Level]=0
FROM ManagedType AS t
WHERE t.TypeName = 'System.ConfigItem'
UNION ALL
SELECT t.ManagedTypeId, t.TypeName, t.BaseManagedTypeId, [Level]+1
FROM ManagedType AS t
INNER JOIN ConfigItemClasses AS c ON c.ManagedTypeId = t.BaseManagedTypeId
)
SELECT *, 'INSERT @Classes VALUES (''' + [TypeName] +''')' [Helper] FROM ConfigItemClasses
ORDER BY [Level], [TypeName]Specifying which classes to replicate.
Configuration Item classes are inherited either directly from the System.ConfigItem class, or from another Configuration Item class. For example, the Microsoft.Windows.Computer class has this class hierarchy:
   ↳ System.LogicalEntity
      ↳ System.Device
         ↳ System.Computer
            ↳ Microsoft.Windows.Computer
In the current version of the portal (v4.0), in order to replicate any given class, you must also replicate all the classes from which that class derives beyond the level of System.ConfigItem. This means that to replicate the Microsoft.Windows.Computer class, you also need to replicate the System.LogicalEntity, System.Device and System.Computer classes.
To facilitate the definition of the class list for the ConfigItemClasses setting, you can run this SQL query against the ServiceManager database. You can use the helper column from the previous query to populate the initial table.
DECLARE @Classes TABLE (TypeName nvarchar(100));
/* Add each class you wish to replicate to the ServiceManagement database */
INSERT @Classes VALUES ('Microsoft.Windows.Client.Computer');
INSERT @Classes VALUES ('Microsoft.Windows.Server.Computer');
WITH ConfigItemClasses (ManagedTypeId, TypeName, BaseManagedTypeId)
AS (
SELECT t.ManagedTypeId, t.TypeName, t.BaseManagedTypeId
FROM ManagedType AS t
WHERE t.TypeName = 'System.ConfigItem'
UNION ALL
SELECT t.ManagedTypeId, t.TypeName, t.BaseManagedTypeId
FROM ManagedType AS t
INNER JOIN ConfigItemClasses AS c ON c.ManagedTypeId = t.BaseManagedTypeId
),
Hierarchy
AS (
SELECT c.ManagedTypeId, c.TypeName, c.BaseManagedTypeId, [Level] = 0
FROM ConfigItemClasses c
WHERE c.TypeName in (SELECT TypeName FROM @Classes)
UNION ALL
SELECT t.ManagedTypeId, t.TypeName, t.BaseManagedTypeId, h.[Level] + 1
FROM ConfigItemClasses AS t
INNER JOIN Hierarchy AS h ON h.BaseManagedTypeId = t.ManagedTypeId
)
SELECT TypeName = STUFF((SELECT ',' + TypeName
FROM (SELECT DISTINCT TypeName FROM Hierarchy) b
WHERE TypeName != 'System.ConfigItem'
FOR XML PATH('')), 1, 1, '');The output from this example is: Microsoft.Windows.Client.Computer,Microsoft.Windows.Computer,Microsoft.Windows.Server.Computer,System.Computer,System.Device,System.LogicalEntity
Resetting the Cache
Once you have defined the classes you wish to replicate to the ServiceManagement database, you need to clean up the data that has already been replicated to the database by the CacheBuilder service.
Run the following commands in SQL Management Studio against the ServiceManagement database:
TRUNCATE TABLE [dbo].[ConfigurationItem];
TRUNCATE TABLE [dbo].[ConfigurationItemClass];
TRUNCATE TABLE [dbo].[Access_CI$User_ConfigurationItem];
TRUNCATE TABLE [dbo].[LastModified];Â
Finally, restart the Cireson Cache Builder service on the server running the portal.