How to connect to local SQL Server using connection string keywords in SQL Server Management Studio?
Posted by: adcertpoint (Moderator)
Date: July 22, 2021 06:55PM

I need to build a connection string for an application, but first I tried connecting from inside SSMS using the same configurations with a connection string, but it's not working.

Here are the keywords I set on the Additional Connection Parameters panel, under Connect to Server:

Server=tcp:FLÉK\MSSQLSERVER02,1433;Database=Medical;Trusted_Connection = yes;

This string will give me the following error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server,
this failure may be caused by the fact that under the default settings SQL Server does not allow
remote connections. (provider: TCP Provider, error: 0 - No such host is known.)

However, I have no problem connecting to the server on the Login panel with the same values.

Server type: Database Engine
Server name: FLÉK\MSSQLSERVER02
Authentication: Windows Authentication

I have enabled TCP connection in SQL Server Configuration Manager and set the connection port to 1433 but I still can't connect to the server using connection strings.

What might cause this issue?

Sorry, only registered users may post in this forum.
This forum powered by Phorum.