Explainer
Where Ignition stores data when SQL Server is connected
Short answer
A SQL Server connection never relocates Ignition's own storage: gateway and project configuration stays in the installation directory's internal database, and only tag history, audit profiles, alarm journals, transaction groups and scripts that are pointed at the connection write records to SQL Server.
On this page
- Does connecting SQL Server move any Ignition data?
- Where do gateway and project configuration live?
- Which Ignition services actually write to SQL Server?
- Where do records go when no database is configured?
- How do you trace each writer to its destination?
- How do you prove a test record landed?
- What can still fail on the local disk?
- Where is each kind of data, case by case?
- Questions asked
You connected SQL Server, and now someone is asking where the data actually lives. The connection changes almost nothing about Ignition's own storage: gateway settings and projects stay in the local installation directory, in a store Ignition manages itself. SQL Server receives only what a configured writer is pointed there to send — tag history, audit records, alarm journals, transaction-group output or a script's own query. The useful answer is a storage map per data class, so this article builds one: where configuration lives, which services write externally, what stays local, how to trace every writer, and how to prove a record landed.
Does connecting SQL Server move any Ignition data? #
No. A SQL Server connection is only an endpoint: the Gateway's configuration and your projects stay in the local installation directory, and only records from a configured writer pointed at that connection — tag history, audit profile, alarm journal, transaction group, script — reach the database.
Think of the connection as plumbing. It gets a name, a server address and credentials, and nothing uses it until some service's own configuration names it. The Gateway can hold several connections side by side — two different SQL Server databases plus a local SQLite file — and your records can legitimately end up split across all of them and the local disk. So "where is the data?" has a different answer for each data class, and one of those answers is "not in SQL Server at all".
Where do gateway and project configuration live? #
It stays under the local installation directory — C:\Program Files\Inductive Automation\Ignition on Windows and /usr/local/bin/ignition on Linux by default — inside a configuration store Ignition manages itself, never inside SQL Server.
This is an ownership rule, not a default you missed: Ignition stores persistent Gateway configuration and projects itself and puts none of it in an external database. Projects are not loose files on disk either; they live inside the Gateway's internal configuration database, a SQLite database named config.idb. Three consequences follow. No SQL query will ever show you a project. Restoring or moving a Gateway is done with Ignition's own gateway backup, not a database restore. And the disk holding the installation directory is a single point of failure for your configuration no matter how healthy SQL Server is.
Which Ignition services actually write to SQL Server? #
Five writer types can put records in SQL Server: a tag history provider, an audit profile, an alarm journal, a transaction group and a script's own database call; each names a database connection, and nothing else in the Gateway writes there.
| Data class | Who decides the destination | Where the destination is set |
|---|---|---|
| Gateway configuration | Ignition itself | Not configurable to a database |
| Project configuration | Ignition itself | Not configurable to a database |
| Tag history | The history provider | The provider's local store or named connection |
| Audit records | The audit profile | The connection the profile names |
| Alarm journal entries | The journal configuration | The connection the journal names |
| Transaction-group output | The group | The connection named in the group |
| Direct scripted writes | Your code | The connection named in the executed call |
One easy confusion: the historian and transaction groups can aim at the same connection, yet they remain separate writers with separate tables. The comparison in Ignition tag historian versus transaction groups sorts out which one to point at a database for which job.
Where do records go when no database is configured? #
History can stay local: the built-in tag history provider keeps its data in local storage under the installation directory, while audit profiles and alarm journals only record when a connection works — pointing them at a local SQLite file is a deliberate configuration, never an automatic fallback.
On the Edge edition the same split holds; where the Ignition Edge tag historian writes its data covers that edition's own location. One caution for the local path: a local SQLite store can hold rows while a trend still renders empty, which is a query-side fault rather than a storage-location one, the case covered in a SQLite historian that stores data while the chart stays empty.
An outage moves data differently per service. A history provider aimed at a database holds unsent records in its local store-and-forward cache under the installation directory and forwards them on reconnect. Audit profiles and alarm journals have no such cache: while their connection is down, those records are lost and the service shows a fault. Where data sits during a bad week depends on which writer failed, and how.
How do you trace each writer to its destination? #
Open the Config section of the Gateway webpage and look under Databases > Connections: that page lists every endpoint the Gateway can write to, and each writer's own configuration page names which connection it uses.
Work through it as an inventory, not a repair:
- List every connection on the Databases > Connections page, and note which are SQL Server and which point at local files.
- Open each writer — history providers, audit profiles, alarm journals, every transaction group — and record the connection it names, or its local storage choice.
- For scripts, read the connection name in the call that actually executes; follow shared project code if the name gets passed around.
- On the SQL Server side, identify the database and tables receiving rows, and use record timestamps to tell current writes from old data.
- Write the result down as a storage register: data class, writer, connection, destination, retention owner, backup method.
Re-check the register after every migration or major configuration change, because a connection can stay healthy while a single writer is repointed. Once it exists, "where is the data" takes ten seconds to answer during the next outage instead of an afternoon.
How do you prove a test record landed? #
Write one known record, then query for exactly it: history tables keep timestamps as epoch milliseconds, so a test value forced at 14:32:05 UTC on 2025-01-01 must appear with 1735741925000 in its timestamp, not as wall-clock text.
Illustrative example — your site's values and clock will differ, the arithmetic will not. You force a known test value through the history path at exactly 14:32:05 UTC on 2025-01-01, then look for it in SQL Server:
- Seconds after midnight: 14 × 3,600 + 32 × 60 + 5 = 50,400 + 1,920 + 5 = 52,325 s
- 2025-01-01 00:00:00 UTC is 1,735,689,600 epoch seconds, so the record's stamp is 1,735,689,600 + 52,325 = 1,735,741,925 s
- In milliseconds: 1,735,741,925 × 1,000 = 1,735,741,925,000 ms
- The one-minute query window runs from 14:32:00 (1,735,741,920,000 ms) to 14:33:00 (1,735,741,980,000 ms)
Require both the stamp 1735741925000 and your test value in the result. A matching row that predates your test only proves the path worked once, not that it works now. For reading historian tables without side effects, follow reading default historian data in SQL Server the supported way. Verify configuration separately: restore a gateway backup on an isolated machine and confirm the projects open, instead of trusting a copied file.
What can still fail on the local disk? #
The Gateway's own configuration and any local stores still sit on the local disk, and a full disk stops the Gateway itself: at startup the internal store raises SQLITE_FULL when it lacks space, and a healthy SQL Server connection changes nothing about that.
SQLite needs working headroom beyond the bytes it already holds, so the fault arrives before the drive is mathematically full. Everything local shares that exposure: the configuration store, a local history provider's storage, any SQLite connection file, and the store-and-forward cache holding not-yet-forwarded records. The decision: monitor free space on the installation drive as seriously as on the SQL Server host, because that drive carries the only copy of the configuration — and, during a connection outage, the only copy of recent history.
Where is each kind of data, case by case? #
Use this map: configuration and projects in the installation directory's internal store; tag history wherever its provider points, local files or a database connection; audit records, alarm journals, transaction groups and scripted writes in exactly the connection each one names.
The decisions to hand to your team:
- Configuration and projects: local, always. Protect them with gateway backups and project exports; no SQL Server backup contains them.
- Tag history: where the provider says — local storage with the built-in provider, a SQL Server database with a provider you aim there, and the local store-and-forward cache during outages.
- Audit and alarm journal records: only in the connection the profile or journal names; with that connection down, expect missing records, not local copies.
- Transaction groups and scripts: in the connection each group or call names — read the group or the code, not the connection list, to find it.
Keep the storage register next to the backup procedures; it is the document you reach for during the next outage or restore.
Questions asked
Can I relocate the configuration store into SQL Server to centralize backups?
No setting does that. Ignition owns the store and keeps it in the installation directory, so centralize protection differently: export gateway backups and projects on a schedule to your backup server, and back up SQL Server with its own tools. The two backups protect different assets, and restoring one never restores the other.
Do I need to install a driver before creating a local SQLite connection?
No. The SQLite connection option is embedded in Ignition with its driver pre-installed, so a fresh gateway can open a file-backed database without extra software. You create it like any other connection, in the Config section under Databases > Connections, and point it at the database file to use.
The gateway will not start and the console shows a SQLITE_FULL error. What is wrong?
The disk holding the installation directory is out of space or close to it. SQLite needs headroom beyond the data it already stores, so the fault appears before the drive is completely full. Free space on that local drive and start the gateway again; a healthy SQL Server connection is irrelevant, because the store that failed is local.
Do transaction groups and the tag historian write to the same tables?
No. Each writer owns its own tables. The historian writes its history tables, while transaction groups write to the tables you name or let them generate. Rows from one writer are evidence only for that path, so verify each writer with its own known record instead of treating one working path as proof for both.