This data sink does not accept data of the given type - Historian store and forward quarantine

I’m using a tag-splitter for the historian, to log to two separate SQL databases/servers (History1, History2)

There are a number of quarantined entries on both the History1 and History2 servers.
‘This data sink does not accept data of the given type.’ is in the ‘Reason’ field.

Selecting ‘Retry’ gives these messages for History1/2
Violation of PRIMARY KEY constraint ‘PK__sqlt_dat__BE126DD136F3F0AE’. Cannot insert duplicate key in object ‘dbo.sqlt_data_1_2019_10’. The duplicate key value is (1310, 1571142856868).

Violation of PRIMARY KEY constraint ‘PK__sqlt_dat__BE126DD12514B870’. Cannot insert duplicate key in object ‘dbo.sqlt_data_3_2019_10’. The duplicate key value is (1312, 1571152442197).

This shows up in the gateway logs:
java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint ‘PK__sqlt_dat__BE126DD105548E0A’. Cannot insert duplicate key in object ‘dbo.sqlt_data_1_2019_09’. The duplicate key value is (1310, 1568335032036).

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2083)

at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:223)

at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:223)

at com.inductiveautomation.ignition.gateway.datasource.DelegatingStatement.executeBatch(DelegatingStatement.java:60)

at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRStatement.executeBatch(SRConnectionWrapper.java:735)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.insertTagValues(TagHistoryDatasourceSink.java:991)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeScanClassSet(TagHistoryDatasourceSink.java:479)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.storeDataToDatasource(TagHistoryDatasourceSink.java:457)

at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:137)

at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:115)

at com.inductiveautomation.ignition.gateway.history.sf.sinks.AggregateSink.storeData(AggregateSink.java:172)

at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:149)

That means that there’s already data in that table for that tag and timestamp. Somehow. Discard those entries. Make sure your split tag history providers are aren’t pointing back at the same DB.

1 Like

@jburt hey, how did you solve the problem?
thx