The cause of the problem is related to the SCCM Identifier. The SCCM Identifier is one of the first ones to execute during the Discovery Identification phase. If the device that is being discovered is not from SCCM, the SCCM identifier runs an unnecessary query on a base cmdb table, such as cmdb_ci_hardware, without a where clause. A query like this has significant performance implications, especially if the data returned by the query is large. The results are also pushed into a JavaScript array, impacting memory and processing time.

The performance improvement is linearly tied to the amount of data in the CMDB. However, if you have thousands of records in your base cmdb tables, then you can expect the average sensor time to reduce by a factor of N just with the impact of reducing the time on the identifier sensors.

Problem Symptoms

Discovery runs slow and there is general performance degradation on the ServiceNow instance during Discovery runs:

- High load on database
- Average/Max sensor time taking seconds instead of milliseconds

Steps to Reproduce

All customers that have Discovery and SCCM installed and are on the following versions are affected by this issue:

  • All Dublin releases that are Patch 6 and lower
  • All Eureka release that are Patch 6 and lower
  • All versions prior to Dublin

To confirm the version and active plugins for your instance, leverage the two links below:

Displays the affected plugins.  Check the Status column to determine if the plugins are active.


To confirm the version, go to https://<instance_name>.service-now.com/stats.do and look for the value for Build tag.


If you are an affected customer with a decent size CMDB, this fix will significantly improve your performance.  Note that if you have customized the SCCM ID & Class Name Identifier for your instance, the instance will not receive the upgrade patched code.  This is because we do not overwrite customized scripts during an upgrade.  If you feel this may describe your situation, please refer to the script code in the workaround section, comparing the script there to the one you currently use.  For more information, see Managing Customizations in Upgrades Best Practices.

For versions where the issue is fixed, see the Fixed In list at the end of this article.



To implement a workaround that will remove this issue if you are unable to upgrade at this time:

  1. Locate all Discovery identifiers.

  2. Click the SCCM ID & Class Name Identifier.

  3. Change the script with the code shown in the following figure and provided below.


The script shown in the figure is as follows:

function(ciData, log, identifier) {
    var sccmID = ciData.getData().correlation_id;
    var matchable = JSUtil.notNil(sccmID);
    var matching = [];

    if (matchable)
        matching = matchingCIs(sccmID, ciData);

    return new CIIdentifierResult(matching, matchable);

    function matchingCIs(id, ciData) {
        var matches = [];

        findBySourceTable(id, ciData, matches);

        if (matches.length == 0)
            findByCorrelationIDField(id, ciData, matches);

        return matches;

    function findByCorrelationIDField(id, ciData, matches) {
        var gr = new GlideRecord(identifier.applies_to);
        gr.addQuery('sys_class_name', ciData.getData().sys_class_name);
        gr.addQuery('correlation_id', id);

        // populate our return value...
        while (gr.next())
            matches.push('' + gr.getUniqueValue());

    function findBySourceTable(id, ciData, matches) {
        var gr = new GlideRecord("sys_object_source");
        gr.addQuery("name", "SCCM");
        gr.addQuery("id", id);
        gr.addQuery("target_table", ciData.getData().sys_class_name);
        while (gr.next()) {
            // Verify it actually exists...
            var grr = new GlideRecord(ciData.getData().sys_class_name);
            if (grr.get(gr.target_sys_id))
                matches.push(gr.target_sys_id + '');

        return matches;


Note: The script change counts as a customer update for this identifier. All future changes will not be automatically applied during an upgrade. For more information, see the "Managing Customizations" section in the article Upgrade Best Practices.



Related Problem: PRB610304

Seen In

Calgary Patch 7 Hot Fix 5
Dublin Patch 8

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2016-07-25 12:39:43