Skip to main content
Version: 8.1

Ignition Database Table Reference

Ignition has a lot of systems built-in that will query the database automatically without requiring you to build a query. These systems automatically create the necessary tables in the database, insert the relevant data, and even query it back out for you. However, because this data is all stored in simple database tables, it can be manually accessed using queries to customize how you see the data.

caution

These tables are configured in very specific ways. Altering them may cause unforeseen issues, and is not recommended.

While it can be useful to manually query out data from these tables, we recommend taking a backup of the database tables before making changes, with the understanding that altering the data or tables is done at your own risk.

Tag History​

The Tag History system utilizes at least six different tables in the database:

Table NameTable DescriptionColumn References
sqlt_data_X_XThis table stores the raw tag data. There will be multiple tables that fit this format depending on the name of the Gateway and the date. (For example, a table named "sqlt_data_1_2018_01" would store data from the driver with an id of 1, for the year 2018, for the month of January)sqlt_data_x_x_x.tagid = sqlth_te.id
sqlth_1_dataThis table stores raw tag data, and is only used when the provider is configured to use a single partition (The provider's "Enable Partitioning" setting is unchecked).sqlt_1_data.tagid = sqlth_te.id
sqlth_teThis table stores the non-data details of each tag.sqlth_te.scid = sqlth_scinfo.id
sqlth_scinfoThis table stores tag group information.sqlth_scinfo.drvid = sqlth_drv.id
sqlth_sceThis table stores start and end times for tag groups.sqlth_sce.scid = sqlth_scinfo.id
sqlth_partitionsThis table stores start and end times for each sqlt_data table.sqlth_partitions.drvid = sqlth_drv.id
sqlth_drvThis table stores information about the drivers of the historical data.none
sqlth_annotationsThis table stores annotations for the Tag History system, such as those created by the Power Chart.none

sqlt_data_X_X​

This is the central table that stores the core tag values. The system stores data in tables based on the history provider's partition length and units. For example, a monthly partition would use a table named like "sqlt_data_{driverId}_{year}_{month}", whereas a daily partition would use "sqlt_data_{driverId}_{yearMonthDay}". The duration of each partition is also tracked on the sqlth_partitions table.

When pre-processed partitions are enabled, an additional sql_data table will be created for each partition. The system tracks which partitions are pre-processed by the "blocksize" column on the sqlth_partitions table.

Column NameData TypeNotes
dataintegrityintQuality of the tag at this timestamp. 192 = Good Quality. Other values represent uncertainty or bad quality. See Tag Quality Overlays.
datevaluedateStores the tag's value if it is type 3 (DateTime), otherwise NULL.
floatvaluedoubleStores the tag's value if it is type 1 (float/double/long), otherwise NULL.
intvalueintStores the tag's value if it is type 0 (int/byte/short/boolean), otherwise NULL.
stringvaluestringStores the tag's value if it is type 2 (string), otherwise NULL.
t_stamplongUnix Timestamp (milliseconds since epoch) for the record.
tagidintUnique id of the tag. References the sqlth_te table.
vtypeintRepresents metadata about the record, primarily used for pre-processed partitions. Possible flags include:
  • 0: Time-weighted average
  • 1: Minimum value
  • 2: Maximum value
  • 4: Exit value (last in window)
  • 32: First value flag (used with min/max to indicate which came first)
  • 64: Entry value (first in window)
For example, a vtype of 97 (64 + 32 + 1) means this record is the entry value, the first value, and the minimum value in the window.
note

Default indexing includes:

  • tagid
  • t_stamp

sqlth_1_data​

This table stores raw tag data for history providers that have disabled partitioning (i.e., the Enable Partitioning setting is unchecked on the history provider). In this mode, data is stored in a single table named sqlth_1_data, instead of being split into multiple sqlt_data_X_X partitions.

The structure of this table is functionally identical to the sqlt_data_X_X tables, but without any partitioning logic.

Column NameData TypeNotes
dataintegrityintQuality of the tag at this timestamp. 192 = Good Quality. Any other value is considered poor quality or uncertain. See Tag Quality Overlays.
datevaluedateStores the tag's value if it is type 3 (DateTime), otherwise NULL.
floatvaluedoubleStores the tag's value if it is type 1 (float/double/long), otherwise NULL.
intvalueintStores the tag's value if it is type 0 (int/byte/short/boolean), otherwise NULL.
stringvaluestringStores the tag's value if it is type 2 (string), otherwise NULL.
t_stamplongUnix Timestamp (milliseconds since epoch) when the value was recorded.
tagidintUnique ID of the tag. References the sqlth_te table.
vtypeintRepresents metadata about the record. This value is used with pre-processed partitions. Possible flags include:
  • 0: Time-weighted average
  • 1: Minimum value
  • 2: Maximum value
  • 4: Exit value (last in window)
  • 32: First value flag (used with min/max to indicate which came first)
  • 64: Entry value (first in window)
For example, a vtype of 97 (64 + 32 + 1) means this record is the entry value, the first value, and the minimum value in the window.
note

Default indexing includes:

  • tagid
  • t_stamp

sqlth_te​

This table stores metadata for each historical tag. A row in this table represents a unique version of a tag's historical configuration. When a tag is modified in certain ways (renamed, data type changed, etc.), a new row is inserted and the previous entry is "retired."

Column NameData TypeNotes
idintUnique ID of the tag. Primary key for this table.
tagpathstringFull path of the tag within the Tag Provider, e.g., Folder1/tag1.
scidintScan class (Tag Group) ID. References the sqlth_scinfo table, indicating the scan class this tag uses.
datatypeintDetermines which column in the partition tables stores the tag’s historical value.
  • 0: Stored in intvalue (used for integers and booleans)
  • 1: Stored in floatvalue (used for floats, doubles, longs, and date/time values)
  • 2: Stored in stringvalue (used for strings)
querymodeintReflects the Deadband Style setting selected when tag history was enabled.
  • 0: Discrete, which stores values when the difference from the last stored value exceeds the deadband.
  • 3: Analog, which uses compression algorithms to evaluate when to store values.
createdlongUnix timestamp (milliseconds since epoch) for when this tag entry was created.
retiredlongUnix timestamp (milliseconds since epoch) for when this tag entry was retired. NULL means the entry is currently active.
A tag is marked as retired when any of the following occur:
  • The tag is deleted
  • The tag is renamed
  • The tag’s scan class (Tag Group) is changed
  • The tag’s data type is changed
If a tag is simply disabled and then deleted, this value will remain NULL.
note

Default indexing includes:

  • id
  • scid

sqlth_scinfo​

This table stores information about Tag Groups (historically called scan classes). Each group defines how frequently a set of tags should record data. Tag Groups are also tied to a specific history driver. See sqlth_drv.

Column NameData TypeNotes
idintUnique ID of the Tag Group.
scnamestringName of the Tag Group. A value of "exempt" is used when the execution rate is not recorded.
drvidintDriver ID this Tag Group belongs to. References the sqlth_drv table. Used to separate data when multiple Gateways or providers write to the same database.
note

Default indexing includes:

  • id
  • drvid

sqlth_sce​

This table tracks execution periods for each Tag Group over time. Each row marks a continuous span during which a Tag Group (i.e., scan class) was actively executing at a specific rate. This is useful for understanding when and how often tags within a group were scheduled to record data.

Column NameData TypeNotes
scidintReferences the sqlth_scinfo table. Identifies which Tag Group this execution period belongs to.
start_timelongUnix Timestamp (milliseconds since epoch) representing the start of the execution period.
end_timelongUnix Timestamp (milliseconds since epoch) representing the end of the execution period.
rateintExecution rate in milliseconds for this Tag Group during the time window defined by start_time and end_time. This value is omitted for tags using On Change scan mode.
note

Default indexing includes:

  • scid
  • start_time

sqlth_partitions​

This table defines the data partitions used by the Tag Historian. Each row maps a time range to a specific table (usually a sqlt_data_X_X table), allowing for efficient querying across large datasets. Partitioning is key for scaling history storage over time, and the system consults this table to determine where to look for historical values.

Column NameData TypeNotes
pnamestringThe name of the table that stores data for this partition, e.g., sqlt_data_1_2025_04.
drvidintThe driver that owns this data table. References the sqlth_drv table. Partitions are created per driver to keep records distinct.
start_timelongUnix Timestamp (milliseconds since epoch) marking the beginning of the time window covered by this partition.
end_timelongUnix Timestamp (milliseconds since epoch) marking the end of the time window for this partition.
blocksizeintThe duration (in milliseconds) of each block of pre-processed data in the table. A value of 0 means this is a regular data partition.
flagsintAdditional flags that affect how the partition is used.
1 = No seed query support. The system will not attempt bounding value ("seed") queries on this partition, which can improve performance on databases with limited indexing.
note

Default indexing includes:

  • pname
  • start_time

sqlth_drv​

This table stores information about drivers, which represent the source systems writing Tag History data. Each driver typically corresponds to an Ignition Gateway or Tag Provider. This distinction is important when multiple Gateways write to the same database, or when a Gateway has multiple Tag Providers enabled.

Column NameData TypeNotes
idintUnique ID for the driver. Used by other tables (like sqlth_partitions and sqlth_scinfo) to associate partitions and Tag Groups with a specific driver.
namestringSystem name of the Ignition Gateway that originated the data. When multiple Gateways are configured to write to the same historical database, this identifies where each record came from.
providerstringName of the Tag Provider within the Gateway. Useful when the same Gateway hosts multiple providers and stores data for each one.
note

Default indexing includes:

  • id

sqlth_annotations​

This table stores annotations, user-created notes or metadata, tied to specific points or time ranges in Tag History. These annotations can be added through tools like the Perspective Power Chart or via scripting. They are useful for marking maintenance windows, process events, or any custom context.

Column NameData TypeNotes
idintUnique ID of the annotation.
tagidintThe ID of the ag this annotation applies to. References the sqlth_te table.
start_timelongUnix Timestamp (milliseconds since epoch) marking the beginning of the annotation's time range.
end_timelongUnix Timestamp (milliseconds since epoch) marking the end of the annotation's time range.
typestringType of annotation. Currently, the only supported type is "note", which represents user-entered text.
datavaluestringThe content of the annotation (e.g., the user’s note text). Only applicable when type is "note".
annotationidstring
New in 8.1.4
A UUID used to track annotations. This identifier is used to track similar annotations across multiple Gateways, such as when storing annotations in a remote provider.
note

Default indexing includes:

  • tagid
  • start_time

Tag History - Internal History Provider​

Internal History Providers use a different table scheme compared to external providers. These tables are stored in an IDB file located at IgnitionInstallationDirectory/data/local/tag-historian.

You’ll need a SQLite viewer to explore this data manually, since the system handles it outside of the configured database connections.

Table NameTable Description
annotationsStores annotations for specific tags, including notes created via components like Power Chart.
schema_infoTracks the schema version and creation timestamp of the internal historian. Usually contains one row.
tagdataHolds the actual recorded values, timestamps, and quality codes for each tag.
tagdetailsTracks tag metadata such as datatype and time-to-live settings. Does not include scan class/group info.
tagpropertiesStores individual tag properties like interpolation mode, deadband, and datatype.
tagsMaps each tag’s ID to its full tag path, allowing for efficient querying.

annotations​

These entries mirror those in sqlth_annotations, but are specific to local history and internal data storage.

Column NameData TypeNotes
idintUnique ID of the annotation.
tagidintThe ID of the ag this annotation is associated with. Maps to the id column in the tags table.
typetextAnnotation type. Typically "note" for user-created textual annotations.
rangestartintStart time of the annotation (Unix Timestamp, in milliseconds since epoch).
rangeendintEnd time of the annotation.
datatextThe annotation content (e.g., text of the user note).
syncidintIdentifier used to synchronize annotations across multiple Gateways.
annotationidintA UUID that uniquely identifies the annotation. Enables tracking across systems.
deletedbooleanMarks whether the annotation has been logically deleted. Used to hide rather than remove data.
note

Default indexing includes:

  • tagid
  • rangestart

schema_info​

Column NameData TypeNotes
versionintIndicates the schema version used by the internal historian. Typically set to 4.
createdintUnix Timestamp (milliseconds since epoch) representing when the internal historian was first initialized.
note

Default indexing includes:

  • version

tagdata​

Column NameData TypeNotes
tagidintReferences the tag's ID from the tags table. Identifies which tag this record belongs to.
numvaluenumericThe numeric value of the tag at this time, if applicable. Will be NULL if the value is non-numeric.
strvaluetextThe string value of the tag at this time, if applicable. Will be NULL if the value is numeric.
qualityintQuality code associated with the Tag value. See Tag Quality Overlays.
t_stampintUnix Timestamp (milliseconds since epoch) representing when the value was recorded.
syncidintID used to track and synchronize records across Gateways.
note

Default indexing includes:

  • tagid
  • t_stamp

tagdetails​

Column NameData TypeNotes
idintUnique identifier for this metadata entry.
tagidintReferences the tag ID from the tags table. Associates this detail row with a specific tag.
createdintUnix Timestamp (milliseconds since epoch) for when this detail row was created. Marks the start of history storage for this version of the tag.
retiredintUnix Timestamp (milliseconds since epoch) for when this detail row was retired. A value of NULL means it's still active.
datatypeintInteger representing the stored data type:
  • 0 = Integer
  • 1 = Float/Double
  • 2 = String
  • 3 = Date/Time
  • 4 = Boolean
ttlintTime-to-live, in milliseconds. If non-zero, represents how long the data is retained before eligible for pruning.
syncidintSync ID used to track and coordinate this record across multiple Gateways.
note

Default indexing includes:

  • tagid
  • created

tagproperties​

Column NameData TypeNotes
tagidintReferences the tag ID from the tags table. Each property row is linked to a specific tag.
nametextThe name of the property. Common values include:
  • InterpolationMode
  • Deadband
  • DeadbandMode
  • Datatype
  • QueryMode
valuetextThe property's stored value, as a string. Interpreted based on the name property.
datatypeintInteger representation of the property's data type. Uses the same encoding as sqlth_te.datatype:
  • 0 = Integer
  • 1 = Float/Double
  • 2 = String
  • 3 = Date/Time
  • 4 = Boolean
note

Default indexing includes:

  • tagid
  • name

tags​

Column NameData TypeNotes
idintUnique identifier for the tag. This value is referenced by other internal historian tables.
tagpathtextFull path of the tag, including its Tag Provider. For example: [default]Folder1/MyTag.
note

Default indexing includes:

  • id
  • tagpath

Alarm Journal​

The Alarm Journal system stores a record of all alarm events—activations, clearings, acknowledgments—along with event-specific data.

By default, it uses two database tables, though the table names can be customized in the Alarm Journal profile settings.

Table NameTable DescriptionColumn References
alarm_eventsStores a row for each alarm event (active, cleared, acknowledged).alarm_events.id = alarm_events_data.id
alarm_events_dataStores name-value pairs of metadata for each event. Multiple rows may exist per event.none

alarm_events​

This table captures the main record of each alarm event that occurred. One row is created for each change in state (active, cleared, acknowledged).

Column NameData TypeNotes
idintUnique ID for this event. Primary key.
sourcestringThe source path of the alarm, such as a tag path or expression item.
displayPathstringHuman-readable display path of the alarm (can be overridden in alarm configuration).
eventTimedatetimeTimestamp for when the event occurred.
eventStateintAlarm state change:
  • 0 = Active
  • 1 = Cleared
  • 2 = Acknowledged
priorityintAlarm priority level:
  • 0 = Diagnostic
  • 1 = Low
  • 2 = Medium
  • 3 = High
  • 4 = Critical
eventFlagsintBitmask representing metadata about the event (e.g., whether it was system-generated).
systemstringThe name of the Ignition Gateway or project that generated the event.
note

Default indexing includes:

  • id

alarm_events_data​

This table stores event-specific properties, such as custom alarm properties or tag values at the time of the event. Each row represents one property for one event.

Column NameData TypeNotes
idintReferences the id from the alarm_events table.
propnamestringName of the property (e.g., "AckUser", "Notes", or "IsShelved").
propvaluestringValue of the property at the time of the event.
note

Default indexing includes:

  • id

Authentication​

The Database Authentication system allows you to manage users, roles, and authentication-related data using a SQL database.

By default, it uses six tables to represent user information. You can customize the table prefix (e.g., from scada_ to something else) in the Gateway settings.

Table NameTable DescriptionColumn References
scada_usersStores user credentials and basic profile data. Each row represents a user.none
scada_rolesStores defined roles. Each row is a distinct role.none
scada_user_rlMaps users to their assigned roles. Users with multiple roles will have multiple rows here.scada_user_rl.user_id = scada_users.id
scada_user_rl.role_id = scada_roles.id
scada_user_saTracks upcoming schedule adjustments for users. Each adjustment gets its own row.scada_user_sa.user_id = scada_users.id
scada_user_ciStores contact information for users, such as phone numbers and emails. Each entry is one piece of contact info.scada_user_ci.user_id = scada_users.id
scada_user_exStores additional user properties (used by modules like Voice Notification). Each property is a name/value pair.scada_user_ex.user_id = scada_users.id

scada_users​

This is the core user table. It contains authentication credentials and general profile information for each user.

Column NameData TypeNotes
idintUnique ID for the user.
usernamestringThe user's login name.
passwordstringEncrypted password hash.
firstnamestringUser’s first name.
lastnamestringUser’s last name.
schedulestringAssigned schedule name (for On-Call Roster or Scheduled Roster logic).
notesstringOptional user notes.
note

Default indexing includes:

  • id

scada_roles​

Stores all defined roles that can be assigned to users.

Column NameData TypeNotes
idintUnique ID for the role.
namestringName of the role (e.g., "Administrator", "Operator").
note

Default indexing includes:

  • id

scada_user_rl​

Links users to their assigned roles. One row per user-role pair.

Column NameData TypeNotes
user_idintReferences scada_users.id.
role_idintReferences scada_roles.id.
note

Default indexing includes:

  • user_id
  • role_id

scada_user_sa​

Stores schedule overrides or adjustments for individual users.

Column NameData TypeNotes
idintUnique ID for the schedule adjustment.
user_idintReferences scada_users.id.
starttimedatetimeWhen the schedule adjustment starts.
endtimedatetimeWhen the schedule adjustment ends.
typestringType of adjustment (e.g., "Available", "Unavailable").
note

Default indexing includes:

  • user_id

scada_user_ci​

Stores pieces of contact info for users, such as emails or phone numbers.

Column NameData TypeNotes
idintUnique ID for the contact info entry.
user_idintReferences scada_users.id.
typestringType of contact (e.g., "Email", "Phone").
valuestringContact information value.
note

Default indexing includes:

  • user_id

scada_user_ex​

Stores custom or extra properties for a user. Often used by modules (e.g., Voice Notification) to store settings like PIN codes.

Column NameData TypeNotes
idintUnique ID for the property.
user_idintReferences scada_users.id.
namestringName of the property (e.g., "VoicePIN").
valuestringValue of the property.
note

Default indexing includes:

  • user_id

Audit Log​

The Audit Log system tracks project and system activity for audit-enabled projects. Events like tag edits, script runs, user logins, and more are logged to a database.

By default, the Audit Log uses a single table—though you can rename it in the Gateway’s Audit Profile settings.

Table NameTable DescriptionColumn Reference
AUDIT_EVENTSStores every auditable event that occurred, such as edits, tag writes, user logins, saves, publishes, and more.none

AUDIT_EVENTS​

This table stores each individual auditable event. A new row is created for every logged action across Gateway, Designer, or Client scopes.

Column NameData TypeNotes
audit_events_idintUnique identifier for the event. Primary key.
actionstringBrief description of the action (e.g., "Tag Write", "Script Run").
action_targetstringThe target affected by the action (e.g., tag path, script name, user).
action_valuestringThe value involved in the action (e.g., written value, changed property).
actorstringThe user or system that performed the action.
actor_hoststringHostname or IP of the system where the action originated.
event_timestampdatetimeTimestamp for when the action occurred.
originating_contextintNumeric bitmask representing the context of origin:
  • 1 = Gateway
  • 2 = Designer
  • 4 = Client
originating_systemstringName of the project or system that performed the action.
status_codeintA 32-bit integer bitmask representing the result of the action (e.g., good, bad, uncertain).
Refer to AuditStatus.SubCode for decoding specific status codes.
note

Default indexing includes:

  • audit_events_id
  • event_timestamp