Getting Started with Databases
The first step in using a database with Ignition is to identify a database server. Many companies already have database servers maintained by their IT departments. If you do not, or wish to set up your own database server for Ignition, the Supported Databases section below offers some advice on choosing a database vendor.
Once you've identified a server, all you need to do is create a connection to that server to get up and running.
Supported Databases in Ignition
Ignition has been tested with the following databases, and can connect to them directly after installation. You can connect to other databases by installing additional JDBC drivers (the Java database connection specification), which are often provided by database vendors.
5.0+ for full support. Ignition can connect to 4.x, but many features such as Tags are not tested.
Ignition 7.9.9+ contains an updated driver that will connect to MySQL 8.0 installations. Note that upgrading Ignition does not update the JDBC driver, so pre-existing installations will need to manually update their JDBC driver.
|Microsoft SQL Server|
2005, 2008, 2012, 2014, 2016 (full and express editions). Ignition can connect to 2000, but has not been fully tested.
|Oracle||10g, 11g, 12c (full and express). The letters stand for "grid" and "cloud"|
|Other JDBC drivers|
Due to variances in databases, some features may not work fully through other non-tested JDBC drivers. However, it is usually possible to get full functionality though the careful use of the database translator feature.
For example, the JDBC driver for MariaDB could be downloaded and added to Ignition.
Choosing other databases
If you are new to working with SQL databases and are trying to choose a vendor, you need to consider the following three factors:
1- Existing company usage
Many companies already use SQL databases for other purposes, and thus most IT departments already have a defined standard. Going along with your company's existing standard is usually recommended, as there will already be staff available who are knowledgeable about the system. Furthermore, you may be able to tie into your company's existing database system instead of maintaining your own.
2 - Price and Features
The fully supported databases shown above vary dramatically in price. Some systems can cost thousands of dollars, but may have a free "express" edition that will work perfectly well for your requirements. Others offer advanced features such as redundancy, which are either not offered or difficult to configure in the other systems. It is therefore important to clearly define the features and capabilities that you need.
3 - Most common among Inductive Automation users
Choosing a database that is commonly used by Inductive Automation users means that you are more likely to find examples and help in the Forum, among other benefits. The supported database list above is sorted according to our current user install base.
Installing and Connecting to a Database
Once you've identified a server, all you need to do is create a connection to that server to get up and running. See the Installing Databases and Connecting to Databases sections for details about how to install and connect to different databases through Ignition.
If we don't already have a connector for your database type, you can simply add it in yourself.
Database Drivers and Translators
What is JDBC?
JDBC stands for the Java DataBase Connectivity API. It is a standardized way for Java-based applications to interact with a wide range of databases and data sources. A JDBC Driver enables Ignition to connect to, and use data from, a particular database system.
JDBC in Ignition
Ignition, being a Java-based application, leverages JDBC in order to connect to a variety of data sources. This enables Ignition to offer a standardized set of functionality on a wide range of different systems and databases. This includes not only commonly-used databases such as MySQL, Microsoft SQL Server, and Oracle, but additionally other lesser-known systems as well, provided the manufacturer offers a JDBC driver for the system.
JDBC vs. ODBC
JDBC differs from ODBC (Microsoft's OpenDataBase Connectivity standard) primarily in the fact that JDBC is written in Java, and thus can be used without modification in cross-platform environments. Additionally, whereas ODBC is a complex standard that is becoming technically out-dated, JDBC is a modern, clean specification for cross-vendor database access.
Can I connect using ODBC?
While it is indeed possible to connect to an ODBC data source using the JDBC-ODBC bridge, this is generally not advised. The bridge is designed to offer a minimal amount of functionality, and is considered a "transitional solution", meaning that it should only be used when JDBC is not available. In other words, if a JDBC option is available, ODBC should not be used.
Since most commercial databases offer JDBC drivers, transition is usually as simple as recreating your database connections inside of Ignition. The lack of a JDBC connection inside of Ignition does not necessarily indicate that JDBC isn't available for your particular database. Licensing restrictions sometime prevent the inclusion of drivers with 3rd-party software. Therefore, before using ODBC, due diligence should be taken to verify that no JDBC solution is available.
Monitoring Connection Status
The state or status of a database can be monitored from the Status section of the Gateway, under Connections > Databases. The status panels show the current state and a fault message, if applicable, or throughput statistics if the connection is active.
When a connection is not available, it is re-tested every 10 seconds, and the status is updated.
Why use Databases?
Providing access to relational databases is at the heart of the Ignition platform. Ignition can connect to any SQL database that has a JDBC driver, though depending on the database's capabilities, some features may not be available. By connecting Ignition to one or more SQL databases, you can query existing data, update data, store historical information, and more.
Ignition can perform many tasks without the use of a database. For instance, the Vision and OPC-UA modules let you create powerful HMI status and control screens, or Tags can be used to generate alarms that can be sent over email. However, tightly integrated database access is a key feature that makes Ignition stand out from its competitors.
Modern relational databases offer amazing storage and querying capabilities with great performance at a price that is incomparable to older legacy historians. While it is true that historians still have a place in the industry, for most applications relational SQL databases not only suffice, but offer much more than what was previously available. Using SQL, you can store and track production information with ease. However, you can also correlate that data to who was on shift, previous runs, downtime, inventory levels and more, naturally and easily. Make the data available to more people using the Vision module's web-launch clients, or integrate the data directly into your company's internal or external website. SQL databases are at the heart of the web and modern corporate IT systems, and now thanks to Ignition, the plant floor as well.
Database connections have a lot of rules for connecting and querying them, but Ignition simplifies all that by creating database connections in the Gateway instead of in the clients. This means from one central location, you can manage all your database connections. One massive problem with databases can be setting up a connection because everything is based on IP Addresses and computer names. Since Ignition connects through the Gateway, all clients have access to your databases and you don't have to worry about adding individual clients to the database rules. Just set up the gateway and launch clients wherever you'd like.