Node red can't connect sql server

How to solve the problem

-- node-red version 3.0.2

-- node version 18.3.0

-- use sql server management version 18.0.1

Firstly, I would remove that very old and unsupported node & install the newer node-red-contrib-mssql-plus node.

You have your node-red and node versions switched. You can edit your post and correct them

1 Like

what SQL Server Version you use.

I'm not. Last time I used SQL Server it was with a 2019 server.

Did you replace the old MSSQL node with the newer node-red-contrib-mssql-plus node?

Yes, but not work

OK, some questions...

  1. Please clarify the exact version of SQL Server
    History of Microsoft SQL Server - Wikipedia

  2. Where is node-red running? On the same computer as SQL Server?

  3. Have you enabled SQL Server Authentication mode?

  4. When you use SSMS to connect, did you use the SQL Server Authentication User+Password (e.g. sa)?

1.ssms version 19.0.1
2.yes run same computer
4.yes i use sa and change password

Ok so a SQL instance doesn't get port 1433

Connect to your SQL server and check the start up log. You should see the port number assigned. Try using that instead of 1433 in the connection config

As I said...

So look in the SQL logs using ssms to find the actual port being used by your instance.

Port 1433 I use every Time when i use Sql

Ok that's cool but...

Microsoft documentation...

If enabled, the default instance of the SQL Server Database Engine listens on TCP port 1433. Named instances of the Database Engine and SQL Server Compact are configured for dynamic ports

So, did you do what I said?

Also, try removing the /instancename part

See here where I helped others connect to an instance: Problem connecting to mssql express · Issue #63 · bestlong/node-red-contrib-mssql-plus · GitHub

Also you still don't seem to be trying the node Steve recommended

why dynamic port 0

@komkitPP that is how instances are setup by default.

If you want to connect to an instance you need to find the port number.

That will be listed in the SQL logs as I have pointed out time and time again.

Until you do this I can not help any further.

This is port

remove the instance name as I said earlier and as it says in the linked GitHub issue.

Sorry, Where is instance name