Problem with connection to the local database

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



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.

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

your Connect URL still has \MSSQLSERVER

2 Likes


There's still no change

Yes, the SQL Browser Service is running

It uses localhost as the instance

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.

Perhaps just follow this guide?

2 Likes

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

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

The username is Thanya

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

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?

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

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

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

1 Like

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

I'll try and reset SQL from scratch.