# Can't Connect to MSSQL local DB

**URL:** <https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045>\
**Category:** Ignition\
**Created:** [February 11, 2022, 6:31pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045 "2022-02-11T18:31:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahernandez](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@ahernandez](https://forum.inductiveautomation.com/u/ahernandez)\
**Post date:** [February 11, 2022, 6:31pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/1 "2022-02-11T18:31:42Z")

</div>

Hi everyone, I’m having issues trying to connect to my local DB for MSSQL. I am using Ignition 8.1.10 and SQL server management studio v18.10. I have checked everything and followed all the steps online, but I am getting this error and don’t know how to fix it:

Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: “PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”. ClientConnectionId:eaee1d6c-8ab1-4c66-a8fc-ee545b7cafdd)

Anyone have any ideas what is going on here?

---

<div class="post-metadata">

**Author:** ![rdyer](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@rdyer](https://forum.inductiveautomation.com/u/rdyer)\
**Post date:** [February 11, 2022, 6:48pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/2 "2022-02-11T18:48:16Z")

</div>

We are having the same issue. I installed java 8.321 and the database connections all faulted. Reverted back to 8.181 and the connections are good.

IT wants the latest java version due to Log4j issues but I don’t know if that helps

---

<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:** [February 11, 2022, 6:59pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/3 "2022-02-11T18:59:55Z")

</div>

See these topics:

[https://forum.inductiveautomation.com/search?q=java.security%20sql%20tls](https://forum.inductiveautomation.com/search?q=java.security%20sql%20tls)

TL/DR: Your SQL Server is old and doesn’t understand modern encryption, which latest java cuts off because it is _ **insecure** _.

---

<div class="post-metadata">

**Author:** ![rdyer](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@rdyer](https://forum.inductiveautomation.com/u/rdyer)\
**Post date:** [February 11, 2022, 7:01pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/4 "2022-02-11T19:01:01Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 11, 2022, 11:19pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/5 "2022-02-11T23:19:00Z")

</div>

This looks like a different error than before, though I don’t know why reverting the Java version would fix it.

This error implies the certificate being used by SQL Server isn’t trusted by Ignition, which isn’t uncommon when it’s self-signed or signed by an internal CA. You just need to add that CA certificate to Ignition’s supplemental cert store for import.

I wonder if one version of Java is not using SSL at all and the other is?

---

<div class="post-metadata">

**Author:** ![ahernandez](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@ahernandez](https://forum.inductiveautomation.com/u/ahernandez)\
**Post date:** [February 14, 2022, 3:40pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/6 "2022-02-14T15:40:16Z")

</div>

Do you know where I can find the CA certificate? Is this something SQL server provides? Where is Ignition’s supplemental cert store? I I’m also running Ignition 8.1 I thought ignition packages its own java in version 8.0+ so why would I need to change the version of Java?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 14, 2022, 3:55pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/7 "2022-02-14T15:55:28Z")

</div>

_If_ that’s the issue the CA certificate would be something configured in SQL Server or maybe you can get your IT admin to help if you have one.

Read about the supplemental cert store here: [Adding Security Certificates into Keystores - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Adding+Security+Certificates+into+Keystores)

You don’t need to change the version of Java, that advice pertains to people on Ignition 7.9 running JDK 8 and having upgraded it to a version that disables the old/deprecated TLS versions by default.

---

<div class="post-metadata">

**Author:** ![ahernandez](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@ahernandez](https://forum.inductiveautomation.com/u/ahernandez)\
**Post date:** [February 14, 2022, 5:58pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/8 "2022-02-14T17:58:48Z")

</div>

Yup that fixed it! I had to first put the SQL CA certificate in the Trusted Root Certification Authorities store. Then I put the CA Certificate in the supplemental directory. Restarted SQL server, the ignition gateway, and then rebooted my computer. My MSSQL is now valid and connected. Thank you so much for the help!

---

<div class="post-metadata">

**Author:** ![Matt\_Risser](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@Matt\_Risser](https://forum.inductiveautomation.com/u/Matt_Risser)\
**Post date:** [March 16, 2022, 4:41pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/9 "2022-03-16T16:41:39Z")

</div>

@ahernandez Where did you find the SQL CA certificate or how did you create one?

---

<div class="post-metadata">

**Author:** ![ahernandez](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@ahernandez](https://forum.inductiveautomation.com/u/ahernandez)\
**Post date:** [March 16, 2022, 7:34pm UTC](https://forum.inductiveautomation.com/t/cant-connect-to-mssql-local-db/56045/10 "2022-03-16T19:34:44Z")

</div>

@Matt_Risser You need to open SQL server configuration manager and go to SQL server network configuration and right click open properties on your database it will probably be something like “SQLEXPRESS.” Afterwards go to the certificate tab and go to view then the details tab then click copy the file and you should be able to export the .DER file. Once you have that certificate file you put in this directory C:\Program Files\Inductive Automation\Ignition\data\certificates\supplemental… I also put in this directory C:\Program Files\Inductive Automation\Ignition\data\certificates. Then restart your gateway and computer and it should work
