enter image description hereI used the server name in ssms and typed in the server name of vs code to add a new connection, however, it shows mssql: Error: Unable to connect using the connection information provided. Retry profile creation? It no longer show error (mssql: Error 11001: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.))
enter image description here I also added new imbound rule at the firewall and allowed TCP port of 1433. I also changed all the TCP port in the Protocol to be 1433. Still, I wasn't able to connect the sql server to Visual Studio Code. Anyone can help me with this? What is the problem actually. It had no problem connecting to ssms at all but why won't it work with vs code?