# MSSQL DB connection on Ignition 8.1

**URL:** <https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572>\
**Category:** Ignition\
**Tags:** ignition81, database\
**Created:** [July 7, 2021, 2:18pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572 "2021-07-07T14:18:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![sathianandan.dharmas](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sathianandan.dharmas](https://forum.inductiveautomation.com/u/sathianandan.dharmas)\
**Post date:** [July 7, 2021, 2:18pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/1 "2021-07-07T14:18:26Z")

</div>

Hi All  
I’ve been trying to set up a database connection for MSSQL database which is running on an MSSQL 2019 server and end up having faulted connection. I checked the URL, db name, and the user credentials it looks right. I’ve tried logging in with the same credentials on the server management studio and it works.

Is the JDBC driver that comes in as default compatible with the 2019 server version or is it only for 2016 version? Or do I need some special switch to make it work?

Cheers  
Sam

---

<div class="post-metadata">

**Author:** ![Cory.grube](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory.grube/32/20476_2.png) [@Cory.grube](https://forum.inductiveautomation.com/u/Cory.grube)\
**Post date:** [July 7, 2021, 2:27pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/2 "2021-07-07T14:27:02Z")

</div>

I ran into a similar issue recently - I believe it was something to do with a change in TLS versions used by Ignition (not my forte so I can’t speak much to specifics). I believe it has to do with [this update](http://forum.inductiveautomation.com/t/nightly-8-1-changelogs-2021/42410/77).

Check out the latest stable JDBC driver on [github](https://github.com/microsoft/mssql-jdbc), under releases on the right hand side. Latest stable is [9.2.1](https://github.com/microsoft/mssql-jdbc/releases/tag/v9.2.1) at time of writing - you’ll want the jre11 version.

---

<div class="post-metadata">

**Author:** ![sathianandan.dharmas](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sathianandan.dharmas](https://forum.inductiveautomation.com/u/sathianandan.dharmas)\
**Post date:** [July 7, 2021, 2:50pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/3 "2021-07-07T14:50:53Z")

</div>

Hi Cory  
Thanks for the response, I tried creating a new driver using the jre11 file from the github repo but still no luck.

---

<div class="post-metadata">

**Author:** ![Cory.grube](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory.grube/32/20476_2.png) [@Cory.grube](https://forum.inductiveautomation.com/u/Cory.grube)\
**Post date:** [July 7, 2021, 2:56pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/4 "2021-07-07T14:56:02Z")

</div>

I would try updating the original MSSQL driver rather than creating a new one.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c00cc56f302684b5af70d9de1897260ee713b81b.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/25b3b1f46dc568e6e7f1f778b148a5780200e258.png)

If that doesn’t work, you’ll want to post any specific stack traces/errors from the gateway status logs. Also, what version of Ignition are you on?

---

<div class="post-metadata">

**Author:** ![sathianandan.dharmas](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sathianandan.dharmas](https://forum.inductiveautomation.com/u/sathianandan.dharmas)\
**Post date:** [July 7, 2021, 3:18pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/5 "2021-07-07T15:18:43Z")

</div>

I updated the existing driver and that didn’t help either. I’m running Ignition 8.1.5.

Thanks for your help, I’ll keep digging

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [July 7, 2021, 3:28pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/6 "2021-07-07T15:28:53Z")

</div>

You need a few things:

This has to be put in in inductive automation/ignition/lib

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/f/df3e6f3c838875bf75ccbcdbb168f5147d9eee0e.jpeg)

Then in our case you have to make sure the service account which ignition is run as is in the allowed security permissions in MSSQL.

Finally make sure this text is in the extra connection properties, database name should be the actual one you’re using:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/b/0b43dd32563aeefa3e7f0f688f38161c3ebfc21a.jpeg)

Nick

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 7, 2021, 4:18pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/7 "2021-07-07T16:18:58Z")

</div>

> **[Microsoft SQL Server (MSSQL) Connection Guide for Ignition](https://support.inductiveautomation.com/hc/en-us/articles/360047131512-Microsoft-SQL-Server-MSSQL-Connection-Guide-for-Ignition)**
>
> Microsoft SQL Server is a popular robust relational database produced by Microsoft. Ignition can connect to Microsoft SQL Server, however many users find difficulty in getting all of the settings a...

---

<div class="post-metadata">

**Author:** ![sathianandan.dharmas](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sathianandan.dharmas](https://forum.inductiveautomation.com/u/sathianandan.dharmas)\
**Post date:** [July 8, 2021, 5:44pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/8 "2021-07-08T17:44:12Z")

</div>

I followed the steps from the docs that @paul-griffith shared for both scenario 1 and 2, and I’m still struggling.  
I want to do a sanity check before poking too much into the firewalls here. So the actual Ignition gateway is hosted on an MS Azure server (which doesn’t have access to the MSSQL DB that I’m trying to connect) but I’m running an instance of the gateway on my VM which has access to the DB and trying to configure the DB through this instance. My question is that when we configure a DB connection from which device is the request being sent out, the device where the gateway is installed or the one where I’ve launched an instance and trying to configure? Thanks

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 8, 2021, 5:52pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/9 "2021-07-08T17:52:13Z")

</div>

All database connections happen from the gateway to the database. In the designer, or a Vision client, we automatically route the query you issue to the gateway, then return the results back. In Perspective, we run the query on the gateway directly, then ‘stream’ the results over a websocket to the actual session in the browser.

---

<div class="post-metadata">

**Author:** ![Damion](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/damion/32/16872_2.png) [@Damion](https://forum.inductiveautomation.com/u/Damion)\
**Post date:** [August 18, 2021, 5:53pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/11 "2021-08-18T17:53:16Z")

</div>

We recently had a similar issue. This was the work around from Inductive Automation. If you update Ignition this will need to be done again as the update will overwrite this.

Launch the Notepad application as an Administrator  
Open the `java.security` file located in `C:\Program Files\Inductive Automation\Ignition\lib\runtime\jre-win\conf\security`  
Remove TLS V1 and TLS V1.1 from the list of `jdk.tls.disabledAlgorithms`  
Restart the Gateway Service

Java 8 Release Changes: [https://www.java.com/en/download/help/release\_changes.html](https://www.java.com/en/download/help/release_changes.html)

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [August 18, 2021, 6:03pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/12 "2021-08-18T18:03:25Z")

</div>

> [@Damion](#):
>
> Launch the Notepad application as an Administrator  
> Open the `java.security` file located in `C:\Program Files\Inductive Automation\Ignition\lib\runtime\jre-win\conf\security`  
> Remove TLS V1 and TLS V1.1 from the list of `jdk.tls.disabledAlgorithms`  
> Restart the Gateway Service

I had the same issue and this was the fix for me, its line 729 in the file Damion mentioned.

---

<div class="post-metadata">

**Author:** ![Damion](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/damion/32/16872_2.png) [@Damion](https://forum.inductiveautomation.com/u/Damion)\
**Post date:** [August 18, 2021, 6:11pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/13 "2021-08-18T18:11:17Z")

</div>

We also had to enable the "Include Schema in Table Name’ under the advanced properties to see the data correctly.

---

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [January 6, 2022, 3:07pm UTC](https://forum.inductiveautomation.com/t/mssql-db-connection-on-ignition-8-1/48572/14 "2022-01-06T15:07:17Z")

</div>

This hit me as well. Removing the TLS entries did the trick.

Does anyone know what specifically triggers it?

-Shane
