Duplicate Entry....Invalid Insert - How to troubleshoot and identify cause?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2015 12:09 AM
I can create the Domain tree as needed but I am getting the error below when I try to Insert the 'ACME' domain
Unique Key violation detected by database (Duplicate entry 'Acme' for key 'domain_u')
Invalid insert
I have checked the error logs and found these:
Warning Cancelling transaction #7714 /sys_db_object_list.do (cancelled by other transaction): Thread Default-thread-3 (stephen.gannon, 3F4EE1FF6FA0020093ACAA385E3EE441), after 13237ms Transaction |
and this;
Error FAILED TRYING TO EXECUTE ON CONNECTION 17: INSERT INTO domain (`sys_updated_on`, `sys_id`, `parent`, `sys_created_on`, `type`, `sys_created_by`, `default`, `sys_domain_path`, `sys_domain`, `sys_updated_by`, `name`, `primary`, `active`, `sys_domain_code`, `sys_mod_count`) VALUES('2015-06-16 13:46:24', '6bafa1336fe0020093acaa385e3ee455', '11b914080f943100308a0eece1050ecc', '2015-06-16 13:46:24', 'Customer', 'stephen.gannon', 0, '!!!/!!$/!!!/!!#/', '6bafa1336fe0020093acaa385e3ee455', 'stephen.gannon', 'Acme', 0, 1, '!!#', 0)
Unique Key violation detected by database (Duplicate entry 'Acme' for key 'domain_u')
I can't find the domain_u anywhere, or any Acme listed in the GUI and I can't see how to use the sysid for the referenced pre-existing Acme domain entry.
I have checked the Business Rules related to the Domain form, but no clues there either?
Any pointers on how to troubleshoot would be greatly appreciated.
Regards
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2015 02:40 AM
Hi Berny, I can't find any reference to insert() the business rule, ui actions etc associated with the domain table/form.
We have had this issue before on other clones, and logged a call with ServiceNow but it was never answered. 6bafa1336fe0020093acaa385e3ee455 in the error above is the ACME domain? How do you lookup the sysid?
Thanks
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2015 02:45 AM
Well, apparently you have a domain table. So on the navigation window you can type domain.list that will bring you to the list of domains and then you can use the condition/filter builder to choose where sys_id is 6bafa1336fe0020093acaa385e3ee455
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2015 03:01 AM
Brilliant, didn't think of the condition builder and now I can be sure that there is no Acme or indeed any inactive\hidden domains in there. Though that means there is nothing to delete/fix. And the question is where on earth is that sysid coming from?
Appreciating your input.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2015 03:15 AM
Hi Stephen, i took a quick relook to your original post and the sys id 6bafa1336fe0020093acaa385e3ee455 actually belongs to the record you wanted to insert into the Domain table. And of course... it will not exist since it failed to insert
You probably want to search by "name" where it is Acme. That should bring you the record causing the unique constraint.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2015 06:50 AM
Hi Berny,
No record of Acme, in the target domain table.
I will raise in the HI account and see if they can I identify the issue and will post he result.
Thanks
Steve.