Hello,
I have the gateway receiving SNMP traps (through Kymera’s SNMP driver) and initially I converted the trap message to a string and wrote it to a String tag. The tag stores it, but the historian refuses to take it, throwing errors that the string is too long. I tried splitting the trap into 2 parts, but it would still sometimes be too long and wouldn’t store in history…
java.lang.RuntimeException: java.sql.BatchUpdateException: String or binary data would be truncated in table '*********************************************', column 'stringvalue'. Truncated value: '{1.3.6.1.4.1.9.9.41.1.2.3.1.5.456: Interface GigabitEthernet0/17, changed state to down, 1.3.6.1.6.3'.
(Table name has been removed from above log message)
I then tried changing the tag type to Document and storing the information as a json. The tag write is successful again, but now I get this error:
java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from UNKNOWN to VARCHAR is unsupported.
If neither a longer string or a json tag are able to store history, the only way I see to move forward is to either brake down the trap into even smaller bits and write to multiple tags, or to store the trap string and the timestamp myself with a named query…
Has anyone had similar problems with storing tag history? Is there some detail that i’m missing or something that I’ve misconfigured?
I appreciate any input.