Ignition to PLEX UX MES using JDBC

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.

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.)

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.

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.

1 Like

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

image

3 Likes

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.

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

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.

1 Like

Forgive my ignorance.

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

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

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