Inserting new records via PDM_LOAD fails with errors

Document ID : KB000112142
Last Modified Date : 24/08/2018
Show Technical Document Details
Issue:
Inserting new records via PDM_LOAD fails with errors similar to the following:

Error 16 on inserting row. 
The inserted row conflicts with existing data. 
Problem row: 
category = ["pcat:403659";] 
lock_object: [1] 
ob_type: [cr] 
sym: [Set Request Area to TechServices.Skype for Business] 
type: [ACT] 
del: [0] 
id: [404122] 
persid: 
[macro:404122] 
 
Error 1 on update, insert or delete done. 
 
Spell_Macro : 
Rows :1 
Inserts:0 
Updates:0 
Errors :2 
MaxKey :404122 

Ending Totals: 

Total tables :1 
Total rows :1 
Total inserts:0 
Total updates:0 
Total errors :2 
Highest Table keys processed :Spell_Macro(404122) 
Files processed: 1
Environment:
CA Service Desk Manager 12.9, 14.1 and 17.x
All Supported Operating Systems
Resolution:
1. Identify the problematic MDB table from the error message.  It can be located right after the 'Error 1 on update, insert or delete done.' statement.  In the example above, it is the SPELL_MACRO table.

2.  Run the following SQL Query against the MDB database to identify the key value of the problematic table 

select * from kc where key_name like '%SPELL_MACRO%' 

3.  Run the following query against the SPELL_MACRO table to obtain the highest ID value

select * from splmac order by id desc

4.  Compare the values returned from the queries executed in Step #2 and Step #3 above.  If the value from the query in Step #2 above is lower than the value returned from the query in Step #3, proceed to the following step.

5. Extract the Key Name of the problematic table from the Key_Control table 

pdm_extract -f "select * from Key_Control where key_name='Spell_Macro'" > kc.txt

6.  Open the KC.TXT file in a text editor and modify the key_value to a number higher than the max ID value returned from the query in Step #3 above

7.  Save the revised file as KC_NEW.TXT 

8   Run the following command to load the revised file

pdm_userload -f kc_new.txt 

Reattempt to run the PDM_LOAD command.
Additional Information:
https://docops.ca.com/ca-service-management/17-1/en/reference/ca-service-desk-manager-reference-commands/technical-reference/ca-sdm-pdm-database-commands#CASDMPDMDatabaseCommands-pdm_load--Add,Update,andDeleteDatabaseRecords