# Problem with connection to the local database

**URL:** <https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143>\
**Category:** Ignition\
**Created:** [May 9, 2024, 6:44am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143 "2024-05-09T06:44:04Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 16, 2024, 5:09am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/22 "2024-05-16T05:09:44Z")

</div>

connection string:  
`jdbc:sqlserver://localhost`  
or  
`jdbc:sqlserver://localhost\SQLExpress`

ensure SQL authentication mode = mixed (must restart service afterward)

ensure TCP/IP protocol is enabled in SQL Configuration

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 16, 2024, 6:02am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/23 "2024-05-16T06:02:53Z")

</div>

![Screenshot (27)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/1/c17137d1f46445181f6b0fd815afb099b9842c91.png)  
 ![Screenshot (28)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/9/09a08faef3a4e44ede52453d66cf905ba1d43db7.png)  
 ![tcp](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/ddda8dc82e05a46b1c9f1762b273194a0a1f8e36.png)

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 16, 2024, 6:03am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/24 "2024-05-16T06:03:58Z")

</div>

![local](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/2938aecbf541671828d26c42974cc87843f18a18.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 16, 2024, 7:49am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/25 "2024-05-16T07:49:52Z")

</div>

SQL Server should have been set up with Mixed Authentication. (Ignition isn't running as the logged in user.) Then with Microsoft SQL Management Studio create a user account for Ignition to use with SQL Server authentication and set a password that never expires.

Check that works with SQL Management Studio.

Then reconfigure the Ignition gateway database connection to use the SQL Server user account and password.

> **[Choose an authentication mode - SQL Server](https://learn.microsoft.com/en-us/sql/relational-databases/security/choose-an-authentication-mode?view=sql-server-ver16)**
>
> Choose between Windows Authentication mode and mixed mode authentication for the SQL Server Database Engine at setup time.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [May 16, 2024, 11:39am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/26 "2024-05-16T11:39:41Z")

</div>

Under SQL Server Services, is the SQL Browser Service running?

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [May 16, 2024, 2:47pm UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/27 "2024-05-16T14:47:19Z")

</div>

> [@Thanya\_Gangesh](#):
>
> ![Screenshot (27)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/1/c17137d1f46445181f6b0fd815afb099b9842c91.png)

your Connect URL still has `\MSSQLSERVER`

> [@hunterdg](#):
>
> connection string:  
> `jdbc:sqlserver://localhost`  
> or  
> `jdbc:sqlserver://localhost\SQLExpress`

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 17, 2024, 4:51am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/28 "2024-05-17T04:51:36Z")

</div>

![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/74b9fad8678e2290ab6c942e0e35bb2eb3d3c490.png)  
There's still no change

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 17, 2024, 5:11am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/29 "2024-05-17T05:11:21Z")

</div>

Yes, the SQL Browser Service is running

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 17, 2024, 8:41am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/30 "2024-05-17T08:41:47Z")

</div>

It uses localhost as the instance

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [May 17, 2024, 12:04pm UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/31 "2024-05-17T12:04:34Z")

</div>

OK. Let's take this one step at a time.  
Do you have a SQL User configured for Ignition to access the database?  
If you login with SQL Management Studio, can you access the database using that user? Don't use Windows Authentication, use the SQL Authentication to verify that you can connect.  
Once you enabled TCP/IP, did you make sure that it was bound to the proper IP for the server?  
After you enabled the Network Protocols, did you restart the SQL Service?

Are you sure this is SQL Express? Express usually installed withe a SQLExpress instance not MSSQLSERVER.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 17, 2024, 12:54pm UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/32 "2024-05-17T12:54:18Z")

</div>

Perhaps just follow this guide?

> **[Connecting to Microsoft SQL Server Express | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/database-connections/connecting-to-databases/connecting-to-microsoft-sql-server-express)**
>
> This guide helps you with any difficulties you may have in getting the correct settings and parameters when connecting Ignition to Microsoft SQL Serverv

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 21, 2024, 6:40am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/33 "2024-05-21T06:40:37Z")

</div>

1.Yes I have a SQL User configured for Ignition to access the database.  
2.No, I'm unable to use the SQL Authentication even though I have enabled it.  
3.Can you elaborate on the proper IP for the server part? I'm a little confused about that.  
4.Yes, after I enabled the Network Protocols, I restarted the SQL Service.  
5.I'm sorry for the confusion but I got to know that it's not SQL Express...it is a proper SQL server.  
 ![SQL](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0e27b87caf4ba8a06c8cd153b1f57bb865746ecd.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 21, 2024, 8:45am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/34 "2024-05-21T08:45:51Z")

</div>

> [@Thanya\_Gangesh](#):
>
> 1.Yes I have a SQL User configured for Ignition to access the database.

I don't see it in the screenshot. What is the username?

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 21, 2024, 8:59am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/36 "2024-05-21T08:59:06Z")

</div>

The username is Thanya

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [May 21, 2024, 10:24am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/37 "2024-05-21T10:24:15Z")

</div>

> [@Thanya\_Gangesh](#):
>
> 2.No, I'm unable to use the SQL Authentication even though I have enabled it.

Get this working before moving on. You should be able to login with SQL Authentication through SQL Management Studio if everything is setup correctly.

> [@Thanya\_Gangesh](#):
>
> 3.Can you elaborate on the proper IP for the server part? I'm a little confused about that.

In SQL Configuration Manage, expand SQL Server Network Configuration, right click on TCP/IP and make sure that the proper IP is in there and enabled and active.

There is something major that has been missed somewhere. Getting Ignition to talk to SQL Server is rarely an Ignition issue, but more on the SQL side of things to allow the correct access. Did you review the document that @jlandwerlen referenced?

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 22, 2024, 9:05am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/38 "2024-05-22T09:05:31Z")

</div>

I found another error while checking the network settings in the Ignition Gateway

 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/0/2003dea83bb7b6182353a45e7b818fb5c1ed50d5.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 22, 2024, 9:12am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/39 "2024-05-22T09:12:40Z")

</div>

That has nothing to do with the database connection. You are looking in the NETWORKING | Web Server section.

Why are you using your name as the Ignition login to SQL Server? You should be using a service account. e.g., "IgnitionConnection".

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 22, 2024, 10:49pm UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/40 "2024-05-22T22:49:42Z")

</div>

You really should read the documentation/guide. It's step by step and easy to follow. It has pictures and everything.

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 23, 2024, 5:43am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/41 "2024-05-23T05:43:58Z")

</div>

I read the documentation and followed it step by step and I was still unable to solve the error.

---

<div class="post-metadata">

**Author:** ![Thanya\_Gangesh](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Thanya\_Gangesh](https://forum.inductiveautomation.com/u/Thanya_Gangesh)\
**Post date:** [May 23, 2024, 5:45am UTC](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143/42 "2024-05-23T05:45:59Z")

</div>

I'll try and reset SQL from scratch.

[Previous page](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143.md?page=1)

[Next page](https://forum.inductiveautomation.com/t/problem-with-connection-to-the-local-database/90143.md?page=3)
