IBM Support

BMXAA4211E - Database error number -803 has occurred when operating on ASSET : Site=1111 Asset=2222.

Troubleshooting


Problem

Why would one receive a Database error number -803 , report the error to the owner of the deployment ?

Symptom

One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "20" constrains table "MAXIMO.ASSET" from having duplicate values for the index key.. SQLCODE=-803, SQLSTATE=23505, DRIVER=3.53.70

Cause

This sequence error when receiving rotated assets often happens because the sequence generator appears to be out of sequence for MAXIMO.ASSET

Resolving The Problem

1) Check if max(assetid) is greater than assetseq nextval:

You can check this by running the following 2 select statements:

select max(ASSETID) from MAXIMO.ASSET;

select (nextval for assetseq) from sysibm.sysdummy1;

2) If max(assetid) is greater than nextval for assetseq then increase the sequence value.

a) Alter the sequence. XXX is a number that is larger than a difference between max(ASSETID) and (nextval for assetseq).

alter sequence assetseq increment by XXX;

b. Select nextval. , keep the result.

select nextval for assetseq from sysibm.sysdummy1;

c. Select max(id). Make sure this value is smaller than the result of step b

select max(assetid) from maximo.asset;

d. Alter the sequence again.

alter sequence assetseq increment by 1;

e. Commit;

f. Try doing the same use case again and check whether the problem is fixed or not.

3) If max(assetid) is smaller than nextval,alter the sequence by doing the above in reverse.

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.1;7.1.1;7.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SS6HJK","label":"Tivoli Service Request Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"","label":"Windows 2008 server"}],"Version":"7.1;7.1.2;7.2;7.2.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSLKTY","label":"Maximo Asset Management for IT"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.2;7.2.1;7.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSWT9A","label":"IBM Control Desk"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSKTXT","label":"Tivoli Change and Configuration Management Database"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"},{"code":"PF027","label":"Solaris"},{"code":"PF010","label":"HP-UX"}],"Version":"7.2;7.2.1;7.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21641478