- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I'm a bit stumped by this. I have a tool to copy records from the PRD instance to the QA instance.
The code is getting records via the table API into QA, then I set the sys_id from the PRD instance using
I ran the code in a background script which shows the following error:
Unique Key violation detected by database (ERROR: duplicate key value violates unique constraint "cmdb_pkey"So the sys_id appears to be used.
The table I am copying is a custom table which is extended from 'hardware', which in turn is extended from 'configuration item'. I checked via url:
says record not found
returns record not found, but the url changes to show table u_cmdb_ci_biopod with the same sys_id
returns record not found, but the url changes to show table u_cmdb_ci_biopod with the same sys_id
My question is, why can I not find the record with that sys_id, which clearly is in the custom table as the table update or insert fails. But I can't see it or do a GlideRecord get() on it. Is there a record that keeps track of sys_ids for each table that still has the sys_id value as being used yet there is no table item using it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Do you have Sn utils? check if the sys_id (01273a9b1b37c61092ad99798b4bcbc2) is used of some other record.
Refer : https://www.servicenow.com/community/in-other-news/global-sys-id-search/ba-p/2430592
You are trying to setup the sys_id of a record, which is from prod. I believe it is going to fail somewhere or other.
The chances of having same sys_ids across instances are less but it can still exist. I would
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Do you have Sn utils? check if the sys_id (01273a9b1b37c61092ad99798b4bcbc2) is used of some other record.
Refer : https://www.servicenow.com/community/in-other-news/global-sys-id-search/ba-p/2430592
You are trying to setup the sys_id of a record, which is from prod. I believe it is going to fail somewhere or other.
The chances of having same sys_ids across instances are less but it can still exist. I would
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
what's the business use-case for this copy?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Thanks for the link to SN Utils.
The use case is to set up a new instance with cmdb data. Keeping the sys_id from PRD has some advantages to keep references working.
Thank you.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I added the extension and it is quick to figure out which table it should be in, however it still shows
"No record found".
Ron