Applications Systems
Instance monitor stops due to a duplicate key object on the CONSPA table
The following error is displayed after an instance has stopped monitoring in DPA: Duplicate Key in object 'ignite.CONSPA_X'. The duplicate key value is ('XXXXXXX, Y).
First published date
Last published date
Overview
The following error is displayed after an instance stops monitoring in DPA:
Duplicate Key in object 'ignite.CONSPA_X'. The duplicate key value is ('XXXXXXX, Y)
Product section
Cause
Resolution
The results of the following query return records that already have plan data in CONSPH and CONSPA, which indicates what DPA is trying to insert as duplicate keys.
- Create a backup of your DPA repository.
- Run the following statement to determine if there are any records with plan data in CONSPH or CONSPA. Replace
<X>with the instance ID that has the issue in COND.01selecta.PLAN_HASH_VALUE,02h.PLAN_HASH_VALUEas'CONSPH',03p.PLAN_HASH_VALUEas'CONSPT'04fromconspa_<X> a05leftouterjoinconsph_<X> h06onh.PLAN_HASH_VALUE = a.PLAN_HASH_VALUE07leftouterjoinconspt_<X> p08onp.PLAN_HASH_VALUE = a.PLAN_HASH_VALUE09whereh.PLAN_HASH_VALUEisnull10orp.PLAN_HASH_VALUEisnull11;To copy the query, move your mouse over it and click the View Source icon in the upper-right corner.
The query above should return 0 rows.
- If any rows are returned, run the following query to delete them, replacing
<X>with the instance ID:01deletefromCONSPH_<X>02wherePLAN_HASH_VALUEIN03(04selecta.PLAN_HASH_VALUE05fromCONSPA_<X> a06leftouterjoinCONSPH_<X> h07onh.PLAN_HASH_VALUE = a.PLAN_HASH_VALUE08leftouterjoinCONSPT_<X> p09onp.PLAN_HASH_VALUE = a.PLAN_HASH_VALUE10whereh.PLAN_HASH_VALUEisnull11orp.PLAN_HASH_VALUEisnull12)13;1415deletefromCONSPA_<X>16wherePLAN_HASH_VALUEIN17(18selecta.PLAN_HASH_VALUE19fromCONSPA_<X> a20leftouterjoinCONSPH_<X> h21onh.PLAN_HASH_VALUE = a.PLAN_HASH_VALUE22leftouterjoinCONSPT_<X> p23onp.PLAN_HASH_VALUE = a.PLAN_HASH_VALUE24whereh.PLAN_HASH_VALUEisnull25orp.PLAN_HASH_VALUEisnull26)27; - Restart DPA and the Ignite PI Server service.