# Error tag data history

**URL:** <https://forum.inductiveautomation.com/t/error-tag-data-history/100549>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 7, 2025, 5:41pm UTC](https://forum.inductiveautomation.com/t/error-tag-data-history/100549 "2025-01-07T17:41:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cesar\_Mendoza](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@Cesar\_Mendoza](https://forum.inductiveautomation.com/u/Cesar_Mendoza)\
**Post date:** [January 7, 2025, 5:41pm UTC](https://forum.inductiveautomation.com/t/error-tag-data-history/100549/1 "2025-01-07T17:41:20Z")

</div>

Good day, I have a problem with tag history data storing. I checked the history tag configuration on the Gateway, and everything seems fine, but in the logs, I have the following error message

```python
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'sqlth_drv'.

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265)

at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1662)

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:615)

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:537)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7417)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3488)

at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:262)

at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:237)

at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:456)

at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)

at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122)

at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRPreparedStatement.executeQuery(SRConnectionWrapper.java:973)

at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runPrepQuery(SRConnectionWrapper.java:167)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.loadOrCreateSystemDetails(TagHistoryDatasourceSink.java:471)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.getSystemDetails(TagHistoryDatasourceSink.java:433)

at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.initialize(TagHistoryDatasourceSink.java:296)

at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:544)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

```

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [January 7, 2025, 8:11pm UTC](https://forum.inductiveautomation.com/t/error-tag-data-history/100549/2 "2025-01-07T20:11:24Z")

</div>

check the access rights of the login you are using for the SQL Server connection.  
It looks to me like it doesn't have create rights and the sqlth\_drv table wasn't created.

---

<div class="post-metadata">

**Author:** ![Cesar\_Mendoza](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@Cesar\_Mendoza](https://forum.inductiveautomation.com/u/Cesar_Mendoza)\
**Post date:** [January 7, 2025, 9:42pm UTC](https://forum.inductiveautomation.com/t/error-tag-data-history/100549/3 "2025-01-07T21:42:21Z")

</div>

I have already checked the access rights, and have read and write permissions. Regarding the sqlth\_drv table, it does exist in SQL, but the problem persists

 ![Captura de pantalla 2025-01-07 133643](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/5/f5535d30c02344fb04a5473ded8b01d681f901ad.png)
