# Store and Forward - Tag History Data Issue

**URL:** <https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812>\
**Category:** Ignition\
**Tags:** ignition81, database\
**Created:** [April 25, 2022, 2:24pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812 "2022-04-25T14:24:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![curtisfennell](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/curtisfennell/32/39017_2.png) [@curtisfennell](https://forum.inductiveautomation.com/u/curtisfennell)\
**Post date:** [April 25, 2022, 2:24pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/1 "2022-04-25T14:24:43Z")

</div>

I have a reoccurring issue with “Tag History Data” for a specific database. I believe at one time there was tag history set up, but i have disabled for the tags, and also disabled the Tag History for the database in question.

I’m stumped as to what could still be trying to insert for the tag history. Is there an easy way to search for tag history enabled on tags that I may have missed? May be partly that the SQL Account attached does not have write and cannot write/create the tables.

See the Error forwarding in logs, but no indication of the origin of the tags per say.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [April 25, 2022, 8:54pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/2 "2022-04-25T20:54:24Z")

</div>

One really simple way would be to export your tags then search for `"historyEnabled": true`

---

<div class="post-metadata">

**Author:** ![curtisfennell](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/curtisfennell/32/39017_2.png) [@curtisfennell](https://forum.inductiveautomation.com/u/curtisfennell)\
**Post date:** [May 6, 2022, 1:44pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/3 "2022-05-06T13:44:29Z")

</div>

So i gave that a shot and nothing comes back with “HistoryEnabled” in an xml export.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 6, 2022, 1:58pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/4 "2022-05-06T13:58:41Z")

</div>

Run a query something like this:

```auto
SELECT DISTINCT TagPath
FROM sqlth_te INNER JOIN [Most recent data partition] on sqlth_te.id = [Most recent data partition].tagid

```

On the database where the history is being stored. It will return the tag path of the tags which are being actively stored.

---

<div class="post-metadata">

**Author:** ![curtisfennell](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/curtisfennell/32/39017_2.png) [@curtisfennell](https://forum.inductiveautomation.com/u/curtisfennell)\
**Post date:** [May 6, 2022, 2:30pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/5 "2022-05-06T14:30:35Z")

</div>

Thats another part of the issue to begin with is that table doesn’t exist.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 6, 2022, 2:47pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/6 "2022-05-06T14:47:02Z")

</div>

I would contact support, and have them look around. In my experience if the database was ever configured as a History Provider then that table will be there. When the provider is removed I don’t believe the table is dropped.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [May 6, 2022, 3:40pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/7 "2022-05-06T15:40:10Z")

</div>

if you export as xml instead of json, search for `<Property name="historyEnabled">true`

Edit: Also, if you have more than one tag provider, you will need to check those too. I just made that mistake yesterday =x

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [May 6, 2022, 5:17pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/8 "2022-05-06T17:17:22Z")

</div>

After re-reading your post, i think the issue may be a bit different. I was cleaning up my dev machine yesterday and noticed over 1k quarantined items, all for database connections that don't exist, but the history providers still did. I managed to clear out the history providers with this post:

> [@Remove Historical Tag Providers](https://forum.inductiveautomation.com/t/remove-historical-tag-providers/14426/9):
>
> The other avenue involves going into the internal database, which is inherently risky. If you’re not comfortable, or not willing to take the risk, then I would suggest contacting support. If you do just want to do it, then: Get a gateway backup. This should always be your first step when doing any significant modification, but especially when directly affecting the internal database. Navigate to the “Status” section of the gateway web interface. Then add sys.internaldb to the path in the URL …

However the quarantined items remain, i am not sure if that's the same issue you are experiencing.

---

<div class="post-metadata">

**Author:** ![curtisfennell](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/curtisfennell/32/39017_2.png) [@curtisfennell](https://forum.inductiveautomation.com/u/curtisfennell)\
**Post date:** [May 26, 2022, 7:53pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/9 "2022-05-26T19:53:59Z")

</div>

So i deleted as mentioned but still see it coming across.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 1, 2022, 12:13pm UTC](https://forum.inductiveautomation.com/t/store-and-forward-tag-history-data-issue/58812/11 "2022-06-01T12:13:11Z")

</div>

Contact support. This forum obviously doesn’t have an answer for you.
