Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
benh3103 Trusted Contributor.
Trusted Contributor.
262 views

AL key fields duplicating

Hello,

some of entries in AL has same key field, they wasn't count but duplicate.

AL with one key field, "multi-mappings" disabled, "Partially cached" disabled.

Can somebody help me to understand, is this a bug in database, or something else?

0 Likes
4 Replies
mschleich Acclaimed Contributor.
Acclaimed Contributor.

Re: AL key fields duplicating

Hi Benh3103,

 

Normally this problem arrives when you have partially cached enabled but you told me that it is not your case.

Did you check directly in the ESM DB to read those data just to confirm they are really there?

What about optimization, is-it enabled or not?

Thanks
Regards

Michael

Highlighted
benh3103 Trusted Contributor.
Trusted Contributor.

Re: AL key fields duplicating

Thanks for your question.

Yes, partially cached and multi-mapping are not enabled. Optimization is not enabled to. Realy weird DB behaviour, this is a reason why I am asking you, experts, to help:)

In DB i see 2 raws with the same key field, but while first raw has all values (key field 'cont_agent', non-key field 'note', 'creation_time', 'last_modified_time', 'count', 'hash_code'), the second one's has only key field, others are empty. When I edit entry with this key field, both of them are changing.

Also, in server.log:

[2019-11-04 14:36:46,881][INFO ][default.com.arcsight.common.schema.mysql.MysqlDatabaseTableSchemaBrokerDelegate] UPDATE ARC_ALD_OAWWY0 SET note=?, last_modified_time=?, count=? WHERE cont_agent=?

*AL has about 2000-3000 entries, but we found only 3 (for this moment) of them are duplicating.

**Seems like in other ALs similar problems exist to.

0 Likes
mschleich Acclaimed Contributor.
Acclaimed Contributor.

Re: AL key fields duplicating

Hi Benh3103,

 

I didn't know that your list was so small thus as it is a strange behavior, I would advice to extract all content in using a Report => CSV then remove duplicate and then re-import into the AL (after having clear entries).

Last Update Time will be overwritten , I don't know if it a problem for you.
But with this trick we will see if it is a bug due to a crash with this list or if there is really a recurrent problem and in that case we will investigate more deeply.

It is possible that this problem was exceptional thus to remove duplicate value is better but in this case, it will be a lot better to clear all entries and re-import them (it will be like a re-initialization of your list)

Thanks
Regards

Michael

benh3103 Trusted Contributor.
Trusted Contributor.

Re: AL key fields duplicating

Thanks a lot, I think that the most "safety" way to solve it is to do an export, like you told. Also by selecting all entries (if possible) in AL, right click mouse on it and do Export => CSV.

Unfortunatly, in the case of creating a csv report, it changing a table schema (probably because of my ignorance, sorry).

I am going to find duplicates by this way in DB:

mysql> select cont_agent,count(cont_agent) from arc_ald_oawwy0 group by cont_agent having count(cont_agent) > 1;

where cont_agent is my key column name and arc_ald_oawwy0 as you know is a AL table name.

And export from CORR-E all non-duplicating raws:

select * from arc_ald_oawwy0 group by cont_agent having count(cont_agent) = 1 into outfile '/opt/arcsight/logger/data/mysql/al-no-duplicates.csv' fields terminated by ',' lines terminated by '\n';

Then add a csv header, clear entries in AL and import csv file into AL.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.