---
sourceDocument: Brazil Security Management
sourceDocumentLink: https://www.servicenow.com/docs/r/security-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Security Management

ft:clusterId :

    - security

bundleId :

    - security

workflow :

    - Technology


---

# Steps to help prevent duplicate or orphaned records after running Vulnerability Response CI lookup rules

# Steps to help prevent duplicate or orphaned records after running Vulnerability Response
CI lookup rules {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Steps to help prevent duplicate or orphaned records after running Vulnerability Response CI lookup rules

This guidance helps ServiceNow customers prevent duplicate or orphaned configuration item (CI) records when importing vulnerability data and running Vulnerability Response CI lookup rules.
Properly constructed matching rules and thorough testing are critical to avoid performance issues and inaccurate CI matching within the CMDB.
Show full answer Show less  

## Key Practices to Prevent Duplicate or Orphaned Records

* **Test with small, targeted data subsets:** Use specific CI Lookup Rules on limited data to gauge matching behavior.
* **Deactivate other CI Lookup Rules:** Only keep the rule being tested active to isolate impacts and avoid conflicts.
* **Analyze matched CIs:** Review matched versus unmatched counts and examine individual CIs for naming or domain issues. Adjust matching rules as needed.
* **Review unmatched CIs:** Group unmatched items by CI class to identify unexpected or irrelevant classes. Decide whether to exclude certain classes or reclassify them for better matching accuracy. Also inspect CI states such as "Retired."
* **Remove test data before full deployment:** Once matching behaves as expected, delete test data from relevant tables (Discovered Items, Vulnerable Items, Remediation Tasks) and rerun matching rules to ensure clean data.

## Deleting Data from Tables

When imported data is incorrect, data cleanup may be necessary. Options include:

* Using the "Delete All Records" feature on tables.
* Configuring automatic table cleaning with Auto Flushes.
* Running scripts to truncate tables, noting that this requires disabling rollback and should never be done in production without consulting ServiceNow support.

These actions require ServiceNow expertise and should be handled with caution to avoid data loss or system issues.

## Additional Resources and Related Concepts

* Refer to ServiceNow knowledge base articles for integrating CI Lookup Rules with Qualys and Rapid7.
* Explore related tasks such as deduplicating existing CIs, reclassifying unmatched CIs, reconciling discovered items, and resolving remediation tasks to maintain CMDB integrity.  
Take steps to help prevent duplicate or orphan records resulting from matching
(configuration items (CIs) within the CMDB.

Importing vulnerability data can be taxing on an instance and performance issues with resources
can occur if rules are not carefully constructed. The logic used to iterate through and perform
matching within the CMDB can result in lengthy processing times. Thorough testing and debugging
of processing scripts in the rules helps alleviate the potential of issues later in the
process.

## Preventing duplicate or orphaned records {#ci-identifier-rules-impl-test__section_mzc_n5b_blb}

* Use small subsets of data that are specific to the CI Lookup Rule being tested.
  * Set all CI Lookup Rules, other than the one being tested, to Inactive.
  * Analyze the imported CIs to ensure that you are observing the expected behavior and matching is occurring properly.
  {#ci-identifier-rules-impl-test__ul_ktt_grb_blb}
* Review Matched CIs
  * Examine the count of matched vs unmatched CIs. Ensure that the percentage is acceptable. Don't just look at the first page, that is likely the first one inserted.
  * Manually search for some CIs.
  * Check to see if there are any naming or field problems (such as searching for a specific domain).If it seems appropriate, add additional matching rules.

  {#ci-identifier-rules-impl-test__ul_u14_krb_blb}
* Review Unmatched CIs
  * Navigate to the Unmatched CIs table.
  * Group by Configuration Item class.
  * Review any classes that don't look right (certificates, network cards, images).
    * Figure out why didn't they match the correct CI?
    * Should the class be excluded?
    * Should the class be elevated to a related class?
    {#ci-identifier-rules-impl-test__ul_z5m_trb_blb}
  {#ci-identifier-rules-impl-test__ul_x14_krb_blb}
* Review CI states such as Retired.
* Remove Test Data
  * Once you begin to observe the correct or expected behavior in CI matching, start over.
  * Start over by: Deleting the data used for testing: (see the Deleting data from tables section)
    * Discovered Items
    * Vulnerable Items
    * Remediation tasks
    {#ci-identifier-rules-impl-test__ul_db4_krb_blb}
  * Manually rerunning all the CI Matching rules.
  {#ci-identifier-rules-impl-test__ul_udl_1sb_blb}
{#ci-identifier-rules-impl-test__ul_skp_2rb_blb}

For more information on CI Lookup Rules and Qualys, see the [KB0750656](https://support.servicenow.com/kb_view.do?sysparm_article=KB0750656) article.

For more information on CI Lookup Rules and Rapid7, see the [KB0818096](https://support.servicenow.com/kb_view.do?sysparm_article=KB0818096).

## Deleting data from tables {#ci-identifier-rules-impl-test__section_ojh_r5b_blb}

Sometimes you have imported data and realize something is wrong. If something is wrong in a development or performance environment, you could reclone from a better environment, but that isn't always an option.  
Note:  
Performing these actions requires ServiceNow expertise.  
There are four options for deleting data from tables:

* Using Delete All Records on Table Configuration.
* Configure the Table Cleaner by navigating to Auto Flushes (sys_auto_flush.list) and creating a new Auto-flush record.
* Truncate the gs.truncateTable using a background script. Using
  truncateTable requires turning off the record for rollback
  check box in the background scripts. Otherwise, a copy of the table and related
  cascade tables are created, take too long, and most likely fail.

  Note:  
  Never use truncateTable in a production environment. Consult you Support representative before executing large deletions in production or shared environments.
{#ci-identifier-rules-impl-test__ul_swj_vsb_blb}
**Related concepts**   

* [De-duplicating existing configuration items](https://www.servicenow.com/docs/wthh2HgjrggYz3j2gpt8Rw "Whenever configuration items (CIs) are updated through a deduplication task, the discovered items (DIs) that are related to those CIs are also updated. The vulnerable items (VIs) and detections are also updated with the CI.")  
**Related tasks**   

* [View and reclassify unmatched configuration items](https://www.servicenow.com/docs/fFkky7Xh1omusS2O5ed65w "Configuration items (CIs) that are not found in the Configuration Management Database (CMDB) are placed in a viewable list of discovered items. This list offers a convenient way to reclassify unmatched CIs.")
* [Reconcile unmatched discovered items](https://www.servicenow.com/docs/pNOqBJT~CW8G4BnuwXSaOQ "Create a scheduled job to reconcile unmatched discovered items.")
* [Resolve remediation tasks](https://www.servicenow.com/docs/CVZwJ5N0Vvgx9ydLgpferg "The flexibility inherent in Vulnerability Response allows you to remediate vulnerabilities in whatever way suits your security organization.")

