How can i identify and delete duplicates from Configuration Item (cmdb_ci) table.

Pranita Bahugun
Tera Contributor

Hello,

I have duplicate data created and the sources of data discovery is

90%- Cloud Discovery

10%- On Prem Discovery

How do i eliminate the duplicates? Are there any OOB jobs through which i can identify duplicates and delete them?

Or what should be the approach?

Any quick help is much appreciated

 

Thanks,

Pranita

4 REPLIES 4

AnirudhKumar
Mega Sage
Mega Sage

There is an OOB feature called De-duplication Tasks. Give it a look

Community Alums
Not applicable

Hi @Pranita Bahuguni ,

Here is a ready code from Ankur in a article:

https://community.servicenow.com/community?id=community_blog&sys_id=656b373ddb96ff401cd8a345ca961958

This exactly as you want just replace tablename with "cmbd_ci"

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Maik Skoddow
Tera Patron
Tera Patron

Hi

please be careful with any scripted solution. First, you should understand why you have duplicates to prevent them in the future.

I recommend reading the following two articles, which explain the topic in a very extensive way:

Kind regards
Maik

Jacques Clement
Kilo Sage
Kilo Sage

Hi - I second that. CMDB duplicates should be approached through the prism of IRE. There are two simple out of the box ways to spot duplicates, leveraging IRE:

  • The CMDB Health correctness indicator (discussed in Maik's second link)
  • The runIdentificationAudit() API, documented here (CMDB Health probably uses it)

Best,
Jacques