Skip to main content

Ignition Database and Historian Integration

By NFM Consulting 1 min read

Key Takeaway

How to connect Ignition to SQL databases for tag history, alarm journals, transaction groups, and custom reporting queries.

Quick Answer

Ignition stores all historical data in standard SQL databases rather than proprietary formats. Database connections are configured in the gateway web interface and support MySQL, SQL Server, PostgreSQL, MariaDB, and Oracle. This open approach enables direct SQL access from BI tools, custom reports, and third-party applications.

Configuring Database Connections

Navigate to Config > Databases > Connections in the gateway. Click Create new Database Connection and select the database type. Enter the JDBC URL, username, password, and connection pool settings (minimum/maximum connections, validation query). Test the connection before saving.

Tag Historian

The Tag Historian module logs tag values to SQL database tables automatically. For each tag with history enabled, Ignition creates partitioned tables in the configured database. Query historical data using:

  • Easy Chart component — Built-in trending widget with tag history drag-and-drop
  • Tag History binding — Bind a table or chart dataset to a tag history query
  • system.tag.queryTagHistory() — Scripting function for programmatic access to historical data
  • Direct SQL — Query the sqlt_data_* tables directly for maximum flexibility

Transaction Groups (SQL Bridge)

Transaction groups move data between OPC tags and database tables:

  • Historical — Log tag values to a database table at a fixed interval
  • DB-to-OPC — Write database values to tags (recipe downloads, setpoint management)
  • OPC-to-DB — Write tag values to database columns on a trigger condition
  • Stored Procedure — Execute a stored procedure with tag values as parameters

Named Queries

Named queries centralize SQL in the project instead of scattering queries across component bindings. Define parameterized queries in the project resource tree, then reference them from bindings and scripts. Named queries support caching, pre-processing, and authorization controls.

Frequently Asked Questions

Ready to Get Started?

Our engineers are ready to help with your automation project.