SQL Database for Ignition Local on EPIC PR2

I’ve got my PR2 running a full license of Ignition and wanted to use their tag historian. I understand that Ignition comes with an internal database that can be used for this purpose, but wanted to also utilize some of the additional database features that come with Ignition. Ignition thankfully has storage limit options and my project isn’t huge, so I’m optimistic the PR2 would be able to handle this.

Has encountered issues connecting Ignition with an internal database spun up via SSH? I believe there’s a sqlite portion to run groov and am not sure whether that’s good area to start out vs following this:
https://blog.opto22.com/optoblog/a-local-database-server-on-your-groov-epic-processor

Cheers.

The Sqlite that is a part of the core of EPIC has NOTHING to do with Ignition, so that should save you some time.
Also the blog you link to is just how to install Mariadb on EPIC from SSH commands, which also has nothing to do with Ignition, so that should also save you some time.

You can probably put some hooks into the db that full Ignition is using, I have never done it, but Im sure there are a ton of Ignition guys that have.
I’d start with Google and more so the Ignition forums.
A this point, there is not much EPIC specific about what you are looking to do, but if you figure it out, a short note here would be really appreciated.

1 Like

You can use that link to install MariaDB on EPIC and set that up in the Ignition gateway for your historian.

I would recommend using a PC/Server though for the database. MariaDB is available for most operating systems. You would need to read the MariaDB docs on creating a database, setting up users, and opening up the proper ports/firewall. You can then point the Ignition gateway to that database server.

Another reason to not install on the EPIC is to avoid needing to backup, reinstall, restore a database every time I need to update the firmware on an EPIC. I would also be concerned about space and flash wear if I had a lot of historian data being recorded.

Edit: For managing MariaDB, I use HeidiSql on windows.

1 Like

Also be aware that Maria is not supported by ‘all’ Ignition modules and the module will fail in odd ways (don’t ask me how I know this).
Best bet is what Philip said, don’t do it on the EPIC.

That last reason of firmware backup alone is a great reason to try to push it out of the system. So long as it leaves the internal Ignition stuff alone, I think we’ll be fine.

The hope was to keep it from spilling beyond the PR2, but I do have a overbuilt computer tightly interacting with the EPIC that we can probably set up a mysql database on. I’ve only got a small use case at the moment for it and can probably get by with some creative solutions.

I’ll see if I can’t find anything on their forums and add here what I find.

Edit: In addition to the existing reasons, Ignition Wizard Phil Turmel says:

Read/Write to Internal Historian as SQL Alternative? - Ignition - Inductive Automation Forum

Use a proper database. Even if the internal historian can do this (I don’t think it can, out of the box). It is based on SQLite, which is very much a light-duty, single-connection tool. At some point, your customers will ask someone else to pull data from your system, and your company would be criticized for using such a lame kit an inappropriate tool.

If your customer doesn’t want a separate database, offer to connect your system to their existing DB. Ignition doesn’t care where the DB is, and external DBs operated by client IT departments tend to be more robust than anything else.

If you’re using Ignition 8, check out:

https://docs.inductiveautomation.com/display/DOC81/Tag+History+Providers

Scroll down to the “Internal Historian Provider” section. If you use that, let us know how it works. I’m also curious what the procedure is to backup this historian - I can’t imagine it being included in the gateway backup…

1 Like