# Ignition to PLEX UX MES using JDBC

**URL:** <https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266>\
**Category:** General Discussion\
**Created:** [October 17, 2022, 2:09am UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266 "2022-10-17T02:09:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnMck](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JohnMck](https://forum.inductiveautomation.com/u/JohnMck)\
**Post date:** [October 17, 2022, 2:09am UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/1 "2022-10-17T02:09:07Z")

</div>

Has anyone had experience using JDBC to connect directly to the PLEX UX underlying SQL Server? Plex exposes an ODBC interface but Ignition is Java based so only the JDBC interface is available.

I'm already using web services to retrieve some data from PLEX, but in a few cases no datasource is available for the data I'm looking for. Since PLEX can accept SQL queries, I can easily create a named query to retrieve the data. Just stuck on getting past the JDBC / ODBC bridge.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 17, 2022, 12:19pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/2 "2022-10-17T12:19:59Z")

</div>

Do you know what underlying DB brand it is? Or did they create their own from scratch? (If the former, that brand's JDBC driver might work.)

---

<div class="post-metadata">

**Author:** ![JohnMck](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JohnMck](https://forum.inductiveautomation.com/u/JohnMck)\
**Post date:** [October 17, 2022, 9:02pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/3 "2022-10-17T21:02:43Z")

</div>

Phil,  
Thanks for the response!!

It’s actually MS SQL Server.  
I’m trying to get information from Plex as to the URL and instance name.  
So far, they are telling me that Plex is only ODBC and not JDBC compatible.  
Knowing that the Ignition JDBC for SQL Server works just fine for all my other projects, not sure what the difference would be here.

I am able to connect using web services (httpPost) and send/receive OK. But Plex responds with HIGHLY convoluted JSON. It'd be a lot easier to get to the DB directly.

---

<div class="post-metadata">

**Author:** ![JohnMck](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JohnMck](https://forum.inductiveautomation.com/u/JohnMck)\
**Post date:** [October 27, 2022, 4:50pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/4 "2022-10-27T16:50:53Z")

</div>

Some updates:

Plex UX only exposes an ODBC connection through a Progress DataDirect ODBC driver for Windows, downloadable from Plex. Unfortunately, you need a Plex UX account to view or download the files.

Following the directions on the Plex website, I was able to establish the ODBC connection to Plex.

I am currently working with a company called CDATA that supplies a JDBC-ODBC bridge. While I don't have the connection working just yet, the path seems promising.

---

<div class="post-metadata">

**Author:** ![pgillan](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@pgillan](https://forum.inductiveautomation.com/u/pgillan)\
**Post date:** [November 23, 2022, 3:55pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/5 "2022-11-23T15:55:32Z")

</div>

We created linked server on SQL that allows us access Plex data through the normal SQL server adapter.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/e/de00571aa498227856f1779639234b27a1407855.png)

---

<div class="post-metadata">

**Author:** ![JohnMck](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@JohnMck](https://forum.inductiveautomation.com/u/JohnMck)\
**Post date:** [December 15, 2022, 4:53pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/6 "2022-12-15T16:53:53Z")

</div>

PGillan -  
Thanks for the reply!!

I was looking at that early on, but was worried about the latencies using the linked server. However, I think you've got the best solution.

Can you show a sample query? I'm having trouble getting the correct pathnames for the tables.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 11, 2023, 2:31pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/7 "2023-05-11T14:31:03Z")

</div>

When you do a linked server like that, can you protect one so it is read only?

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [May 11, 2023, 2:34pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/8 "2023-05-11T14:34:18Z")

</div>

Definitely more a SQL Server than Ignition one but short answer is yes.

Going off my memory but basically, when you set up a linked server you have to give a login for the server to login to the linked server. On your linked server you would set the permissions of that login to SELECT statements only or Read Only access, I forgot how it's phrased. You can get a better answer at a DB focused forum.

If there is a DBA involved in the system, consult with them they can probably do it quickly for you.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [May 11, 2023, 2:41pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/9 "2023-05-11T14:41:03Z")

</div>

Forgive my ignorance.

Why do people use BAP to connect to SAP if there is this linked server option in Microsoft SQL?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [May 11, 2023, 5:19pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/10 "2023-05-11T17:19:13Z")

</div>

Connect and DB Data Reader is what you assign to the login

---

<div class="post-metadata">

**Author:** ![mives1](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@mives1](https://forum.inductiveautomation.com/u/mives1)\
**Post date:** [December 16, 2024, 5:45pm UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/11 "2024-12-16T17:45:00Z")

</div>

are the tables live data or up to an hour old?

---

<div class="post-metadata">

**Author:** ![Chris.Hawkey](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Chris.Hawkey](https://forum.inductiveautomation.com/u/Chris.Hawkey)\
**Post date:** [January 11, 2025, 1:21am UTC](https://forum.inductiveautomation.com/t/ignition-to-plex-ux-mes-using-jdbc/65266/12 "2025-01-11T01:21:09Z")

</div>

The data is 2 hours old when you query PROD from ignition via the linked server, because plex serves the data from its Report database but it is immediate in TEST
