Add unique ID (CI ID) for all CMDB classes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2014 07:24 PM
I have created CI ID field as a unique filed in cmdb_ci TABLE to be used to
all CI as unique identifier. It works well when new CI record is created
, which a unique CI id: CIxxxxxxxxx will be generated. However, We
have many CIs were already imported into ServiceNow CMDB. My
question is how can we add a unique CI ID to the existing CI records, or
CI data that we will import to ServiceNow future.
I really need your expertise to point me to right direction. I greatly
appreciate your feedback
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2014 06:05 AM
You can use a scheduled job or background script to populate all the current CIs using the default method SN uses to increment their ticket numbers (getNextObjNumberPadded()). If you loop through all existing (or desired) CIs to assign the GUID/CIID, you will have that taken care of.
I would make sure to do the follow in the script:
1) query for all hardware and application type CIs (more if you're importing software, disk, and NIC info)
2) sort by descending, so the largest CI ID will be the first result
3) use the getNextObjNumberPadded(); function to grab the next result (or increment it yourself)
4) update the record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2014 06:29 AM
The following post may help you out - Error while numbering CIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2014 08:06 AM
Many thanks for your information. It works as we expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 09:22 AM
To get additional info/hints please see next wiki links:
http://wiki.servicenow.com/index.php?title=System_Dictionary
http://wiki.servicenow.com/index.php?title=CSHelp:Dictionary_Entry
http://wiki.servicenow.com/index.php?title=Reference_Qualifiers
Note: recommended to update existing CIs in the CMDB or create a new CI if no match is found - based on:
1. Serial Number in the cmdb_ci_computer table
2. MAC Address in the cmdb_ci_network_adapter table
3. Computer Name in the cmdb_ci_computer table