IMD SolutionComputing LibraryShop main store

Troubleshooting

Why Ignition tag historian tables are not created

Edge computing and IIoT Published 6 min read

Short answer

In Ignition tag history, periodic mode still stores nothing until the tag value changes once and fires the initial store. A connection that reads Valid and a login with full write rights are never exercised before that first store, so a static tag keeps zero rows even at a one-second sample rate. Force one controlled value change, count the rows, and only then look at provider or database permissions.

On this page
  1. What the empty system actually proves
  2. Force the initial store with a controlled value change
  3. What Valid, write rights and an empty quarantine mean
  4. When a confirmed change still stores nothing
  5. The decision for each case
  6. Questions asked

The tables are not created because no row has ever been stored. In Ignition tag history, even Periodic mode stores nothing until the tag value changes once and fires the initial store, so a connection that reads Valid, a login with full write rights and an empty Store and Forward queue all describe a historian that has never started. On the test system behind this article, tags held fixed values at a one-second sample rate and produced zero rows; the first deliberate value change produced a record immediately, then one row per second. Force one controlled change on a test tag and count the rows before you touch a permission, the provider or the database.

What the empty system actually proves #

Each observation in the fault report eliminates one stage, and together they eliminate every stage except the trigger:

  • The live value updates on screen and in the tag browser, so acquisition and the tag itself are alive.
  • The database connection reads Valid, so the Gateway reaches SQL Server 2019 over the driver Ignition ships.
  • A table created from the Query Browser proves the login can create tables in the target database.
  • Store and Forward holds nothing quarantined, so no sample ever entered the pipeline. A database that rejected writes would fill that queue; an empty one means nothing was ever sent.

Not one of those four checks has exercised storage, because storage never began. The pattern around the fault confirms the mechanism: the tags that kept recording had each already fired a first change-driven store earlier in their life, while the newly history-enabled tag had not. After the fresh reinstall, no tag had changed since history was enabled, so no tag had a store to continue from. A tag that never updates at all points at collection, and the historian trend-empty walkthrough separates that fault from history faults; a live value with no history is the signature of an unfired initial store.

Force the initial store with a controlled value change #

The Ignition 8.1 manual defines both history modes by when the historian checks a tag: On Change checks on each value change, Periodic checks on a fixed interval. Checking is not storing. Run this sequence on one tag and let the row count decide:

  1. Choose a test tag you can move freely; an internal memory tag exercises the historian without touching a driver. Never force a production setpoint, command or interlock to create the change.
  2. Note the current value and confirm the quality is Good in the tag browser. If the tag is device-backed and anything looks stale, work through tracing the tag from controller to historian display first.
  3. Read the saved history settings back: history enabled, the intended history provider selected, Periodic mode, a 1 s sample rate, and that provider pointed at the database connection whose tables you are inspecting.
  4. Change the value once, from 10 to 11. The size and direction of the change do not matter; the quality staying Good does.
  5. Wait one sample interval, then query the historian tables in the target database for that tag path over the last few minutes.
  6. Count the rows: one from the initial store, plus one per sample interval since.

The row count that decides it #

Two tags, tag1 = 10 and tag2 = 20, both history-enabled at t = 0 with Periodic mode and a 1 s rate:

  • t = 0 to 60 s: neither value changes, so the historian runs 60 checks per tag. Rows: 60 checks × 0 stores = 0.
  • t = 61 s: tag1 changes from 10 to 11 and the initial store fires: 1 row.
  • t = 62 to 121 s: tag1 holds at 11 and gains one row per second: 60 × 1 = 60 rows. tag2 never changes and stays at 0.
  • Total: tag1 has 1 + 60 = 61 rows after about two minutes; tag2 has 0.

A count of one row at the instant of the change clears the database, the login and the provider in a single test, and it tells you tag2 stays empty until it changes once too. The historian creates its schema when the first store arrives, not when the connection is made, which is exactly why a database with a Valid connection and full rights can still hold none of its tables.

What Valid, write rights and an empty quarantine mean #

Keep the three readings apart, because only one of them says anything about the historian:

  • Valid tests that the Gateway can open a session to the database. It says nothing about schema creation or inserts, because the historian has attempted neither.
  • A manual table created from the Query Browser proves the login's rights, and only when it is run through the same connection the provider uses, not a separate administration client signed in as a database administrator.
  • An empty Store and Forward queue proves no store was ever sent. That argues against a database-side rejection, which would show quarantined records, and points upstream to the missing trigger.

Do not build the historian tables by hand. A hand-made table proves the login but is not the schema the historian creates and manages, and it leaves behind an object the historian did not create. If rights still need proving, create one disposable test table through the Ignition connection, confirm it lands in the target database, then drop it.

When a confirmed change still stores nothing #

If the tag browser shows the change with Good quality and the count is still zero with nothing quarantined, the trigger worked and the storage path did not. Work down this list once, in order:

  • Check the history provider on the Gateway: it must be enabled and pointed at the connection whose database you inspected. Disable it, then enable it — the controlled reinitialization test. It was tried in this case without result, so treat it as a check, not a fix.
  • On a newly created provider, restart the Gateway once. That is what created the tables and started logging in the reported fresh-provider case, after value changes alone had not.
  • If the count is still zero, read the Gateway logs at the minute of the change instead of trusting a summary. The line about one unexpected exception handled while handling another carried no usable detail, but anything logged at the change still localizes the failing stage.

The order matters: the value change tests the trigger, the provider cycle and restart test the transport, and only a proven trigger plus a proven transport should ever point back at the database.

The decision for each case #

  • Static tag, zero rows, Valid connection, clean quarantine: working as designed. Force one value change to commission the tag; from the first store on, expect a row per sample interval even while the value holds.
  • New tag on a historian that already records: it stays empty until it changes once, whatever the sample rate is. The fix is one change, not a settings change.
  • Confirmed change with Good quality, still zero rows, nothing quarantined: cycle the history provider once, then restart the Gateway once if the provider is new. That sequence produced the tables in the reported case.
  • History starts but later shows holes: a different fault at a later stage, and the silent data gaps fix covers it.
  • Still zero after a confirmed change, a provider cycle and a restart: verify the database the provider actually selects, and read the Gateway logs at the change before touching credentials again.

Questions asked

Which Ignition versions show this behavior?

The zero-rows-until-first-change behavior was reproduced on Ignition 8.0 and 8.1 on the system in this case, and a table-creation stall with the same signature was reported on 7.9. Treat the controlled value change as the first test on any version, then confirm the result on your own gateway by counting rows around a change you made on purpose.

How can I test the historian without touching live values?

Add a memory tag to the same tag provider, give it the same history provider, mode and sample rate as the affected tag, and change that tag instead. The historian cannot tell where a value came from, so the test exercises the provider, pipeline and database exactly as a device tag does, while keeping the change away from production setpoints, commands and interlocks.

Does a faster sample rate make a static tag store history?

No. The sample rate sets how often the historian checks a tag after storage has started; it never creates the first store. A tag holding one value produces zero rows at one second, one hundred milliseconds or one minute alike. Change the rate only after a value change has fired the initial store and you want denser coverage of a moving value.

Should Store and Forward show the first stored record?

No. Store and Forward lists records only once they are in the pipeline bound for the database, and it drains quickly during normal operation, so an empty queue is expected even while history flows. Quarantined records appear only when a store was sent and rejected. Confirm the first store with a row count in the database instead.

Keep reading

  • Troubleshooting

    Historian stores zero after an MQTT edge node reconnects

    A 0 stored just before the true value at every MQTT edge reconnect is a reported pattern on Ignition 8.1.5 through 8.1.15 with the MQTT Transmission and Engine modules 4.0.6 through 4.0.10. Confirm it by querying stored records around each reconnect, exclude those zeros from process data, and remove them with a timestamped rule instead of a blanket zero filter.

    Edge computing and IIoT

  • Troubleshooting

    Fix duplicate driver IDs after a Docker historian upgrade

    Duplicate rows in the historian driver table after a container upgrade mean the gateway identity changed: the data volume or hostname was not carried forward, so the historian opened a new driver ID and logged under it. Pin the volume and hostname, restart the history provider to flush its cached tag IDs, and rebuild the schema only after that. ID jumps of about 1,000 are database sequence caching, not a fault.

    Edge computing and IIoT

  • Troubleshooting

    Historian reads slow in Excel after adding tags

    Run one timed test before touching anything: read one old tag and one newly added tag over the same range in the historian's built-in client, then in the Excel macro. Fast in the client but slow in Excel means the macro's request pattern is the fault; the new tag slow in both means you run the historian's validate action and then confirm the SQL maintenance plan actually targets the historian database.

    Edge computing and IIoT