Hi,
You're getting duplicate rows in SQL Server because the trigger in your KEPServerEX DataLogger is staying TRUE for more than one scan cycle. While it's TRUE, the logger is recording the same data repeatedly.
To fix this, you can try one of the following:
Set “Log All Items” to No so it only logs when the value changes.
Change the trigger to create a short pulse—make the tag TRUE for one cycle only, then FALSE. This way, it logs only once per event.
If you want to keep the current setup, add a timestamp or auto-increment column in SQL Server so each row is unique.
You can also handle duplicates at the database level using a view or filtering logic.
The cleanest solution is to trigger logging with a short one-time TRUE condition or enable logging only on change.
Thanks,
Hi,
You're getting duplicate rows in SQL Server because the trigger in your KEPServerEX DataLogger is staying TRUE for more than one scan cycle. While it's TRUE, the logger is recording the same data repeatedly.
To fix this, you can try one of the following:
Set “Log All Items” to No so it only logs when the value changes.
Change the trigger to create a short pulse—make the tag TRUE for one cycle only, then FALSE. This way, it logs only once per event.
If you want to keep the current setup, add a timestamp or auto-increment column in SQL Server so each row is unique.
You can also handle duplicates at the database level using a view or filtering logic.
The cleanest solution is to trigger logging with a short one-time TRUE condition or enable logging only on change.
Thanks,
Hi @VH_10682998,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag
