# JDBC connection to Pi

**URL:** <https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760>\
**Category:** Ignition\
**Created:** [February 4, 2022, 3:33pm UTC](https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760 "2022-02-04T15:33:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrautomation](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vrautomation/32/11155_2.png) [@vrautomation](https://forum.inductiveautomation.com/u/vrautomation)\
**Post date:** [February 4, 2022, 3:33pm UTC](https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760/1 "2022-02-04T15:33:54Z")

</div>

Hello,

Does somebody really succed to create a SQL connection to OSIsoft Pi?  
I’m using this procedure:

> **[Using JDBC to Access OSI PI from Ignition](https://support.inductiveautomation.com/hc/en-us/articles/360047175812-Using-JDBC-to-Access-OSI-PI-from-Ignition)**
>
> Preface
> This document outlines the steps necessary to utilize the OSIsoft PI JDBC driver to query data from PI in Ignition. This document assumes a familiarity with the PI architecture and software...

I successfuly added the driver to the gateway. But the connection always failed.  
I expect I may have a security issue. Can somebody who succed to create the connection tell me exactly how you did?

Many thanks.

---

<div class="post-metadata">

**Author:** ![kvane](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kvane/32/22228_2.png) [@kvane](https://forum.inductiveautomation.com/u/kvane)\
**Post date:** [February 4, 2022, 8:57pm UTC](https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760/2 "2022-02-04T20:57:49Z")

</div>

Ignition 8 utilizes JDK 11 and therefore the JDBC driver for PI needs to be new enough to work with that. I have seen users find success while utilizing the PI JDBC Driver 2019 which I last saw at this [link](https://livelibrary.osisoft.com/LiveLibrary/content/en/jdbc-v6/GUID-66B46E01-B176-4A1E-8433-A27C5947FF3B) (I think you must register an account with OSIsoft to view it).

The stack trace of the connection error may help pinpoint the issue.

---

<div class="post-metadata">

**Author:** ![mokam](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mokam](https://forum.inductiveautomation.com/u/mokam)\
**Post date:** [April 5, 2023, 12:59pm UTC](https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760/3 "2023-04-05T12:59:30Z")

</div>

Hi Kvane can you send a new link.  
Thanks.

---

<div class="post-metadata">

**Author:** ![kvane](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kvane/32/22228_2.png) [@kvane](https://forum.inductiveautomation.com/u/kvane)\
**Post date:** [April 5, 2023, 3:13pm UTC](https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760/4 "2023-04-05T15:13:05Z")

</div>

This is a 3rd party company we aren't affiliated with so I am not sure where they moved their JDBC links, I would recommend searching the new website that the URL redirects to.

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [April 5, 2023, 3:30pm UTC](https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760/5 "2023-04-05T15:30:22Z")

</div>

[https://docs.aveva.com/bundle/pi-sql-client-jdbc/page/pi-sql-client-jdbc.html](https://docs.aveva.com/bundle/pi-sql-client-jdbc/page/pi-sql-client-jdbc.html)

---

<div class="post-metadata">

**Author:** ![Thomas\_Soerensen](https://avatars.discourse-cdn.com/v4/letter/t/ee7513/32.png) [@Thomas\_Soerensen](https://forum.inductiveautomation.com/u/Thomas_Soerensen)\
**Post date:** [April 5, 2023, 8:42pm UTC](https://forum.inductiveautomation.com/t/jdbc-connection-to-pi/55760/6 "2023-04-05T20:42:00Z")

</div>

> [@vrautomation](#):
>
> dded the driver to the gateway. But the connection always failed.  
> I expect I may have a security issue. Can somebody who succed to create the connection tell me exactly how you did?
> 
> Many thanks.

Have you though about using the PI WebAPI instead? It requires a little bit of Python code, but it works pretty well when it has been setup.
