Hi,
I am getting the below error in my logs for a simple protocol that puts API data into a table. I'm not familiar with this error and the table set up seems no different to other tables I have configured before. Are you please able to advise how I might resolve this?
Table [4000/EventsTable] Data not loaded, could not find primary key. Detected invalid data in DB for column pid: 4009, chIndex: 88 and chValue: 30382F31392F323032332031303A30303A3433. 2023/09/04 16:37:23.711|SLProtocol - 7756 - EMS|20052|CProtocol::InitFunc|CRU|0|LinkReadWrite
Hi Carys,
Can you share with us for which connector you encountered this?
It looks like you have some corrupted data in the database for table 4000.
I would recommend making our techsupport@skyline.be aware of this problem, so they can investigate why it got corrupted and support you in getting the issue resolved.
If you want to go into the details yourself. You can run a couple of queries to understand how much data got corrupted for this element by running the following queries directly on the DB (adjusted to your use case of course):
select * from elementdata where d = 732 and e=17726 and p < 4000;
select * from elementdata where d = 732 and e=17726 and p > 4500;
If these queries go through, but the following fails, then you know the issue is in DB with the entries in the selected range. You can narrow it down further and eventually run deletes as narrow as possible to get rid of the corrupt data.
select * from elementdata where d = 732 and e=17726 and p > 4000 and p < 4500;
The cleanup (make sure you know what you are doing to avoid that you delete any valuable data, if in doubt contact our Techsupport):
delete * from elementdata where d = 732 and e=17726 and p > 4000 and p < 4500;
After you have cleaned up the corrupt data, you should be able to restart the element without problem.