In this post, we will see how to fix a possible error of connection that we could have trying to connect at SQL Server using TCP/IP.
For this post, I have installed SQL Server 2019 Express edition and SQL Server Management Studio.
I have created a password for the sa user and I can connect using all these “Server name”:
localhost
.
computer name
But, if I try to connect using 127.0.0.1 as Server name, I receive this error:
In order to fix this problem, we have to check that TCP/IP is enabled in Sql Server Configuration Manager.
First of all, we open Microsoft Management Console writing mmc in start menu:
Then, we click on File->Add/remove Snap-in:
Finally, we select Sql Server Configuration Manager, we push Add and then we click on Ok:
Now, we open “SQL Server Configuration Manager”, we select TCP/IP (we can see that it is disabled…) and then we enabled it:
Finally, we restart Sql Server service and then we try to connect using 127.0.0.1 as “Server name”: