Unable to connect to SQL Server 2016 Developer Edition that has TCP/IP turned on
I am trying to connect to a SQL Server 2016 Developer Edition database named LibraryDB using WIndows Authentication using DataGrid 2017.1.4.
This is not SQLEXPRESS.
This is not LocalDB.
This is the DEFAULT INSTANCE installed locally on my laptop.
I can successfully connect to that database using SQL Server Management Studio 2016 using a connection with Sever=.;Database=LibraryDB and the Windows Authentication specified. I can even force the SSMS connection to explicitly use TCP/IP as the "network protocol" to prove that the server allows TCP/IP connections, so please don't tell me to turn on TCP/IP because IT IS ALREADY TURNED ON.
The error I see when I try to connect using DataGrip 2017.1.4 is:
Connection to LibraryDb@localhost failed.
[08S01] The TCP/IP connect o the host., port 1433 has failed.
Error: '"null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connection at the port.
Make sure that TCP connection to the port are not blocked by a firewall.
Clearly, TCP/IP connectivity to the server and database are NOT THE PROBLEM because I can use TCP/IP to connect to the same server and database using SSMS 2016 on the same computer where DataGrip is installed.
Why can't DataGrip do something as simple as connecting to the DEFAULT INSTANCE (not SQLEXPRESS, not LocalDB) the same way SSMS 2016 does easily?
Please sign in to leave a comment.
Hi,
We're connecting to SQL server using JDBC over TCP/IP.
Make sure that there's no firewall rule blocking TCP connection to port 1433. You can find possible solutions here https://stackoverflow.com/questions/18841744/jdbc-connection-failed-error-tcp-ip-connection-to-host-failed . Connecting with SSMS 2016 can not guarantee that it uses TCP/IP.
Thank you.
Just wanted to say I managed to get SQL Server 2017 Developer Edition working with DataGrip 2018.2
Initially, I had a little trouble and it may seem natural to blame DataGrip, but then I remembered SQL Server installations now disable named pipes & TCP/IP by default as a security precaution.
So you have to explicitly enable them in the SQL Server Configuration Manager, which is installed by default.
As for the DataGrip settings, I didn't have to specify any settings to get it working. Just the standard connection to localhost works.