Can’t get the Connection for specified properties; com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host (localdb)mssqllocaldb, named instance localdb#dcd9bdd9 failed. Error: “java.net.UnknownHostException: (localdb)mssqllocaldb”. Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.
Could you please help me out what’s going wrong with my connection string or with driver?
However my server name is = “(localdb)\mssqllocaldb” and as its Microsoft sql server 2014 local db its not running on any port. Please correct me if I’m wrong. Right now I’m not able to find out my local db port number on which it is running so, I taken another way which is of instance name.
Could you please give me clear idea how I can create my connection string using my server name , instance name and windows authentication?
I tried with the port number 1433 and even with other port numbers it giving me below exception -
Can’t get the Connection for specified properties; com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host mssqllocaldb, port 1434 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 connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.”.
I checked the TCP/IP connection all the things are working fine however still I’m not able to connect to my database.
Originally posted by andrewsaunders on March 24, 2017
I’m having similar trouble with a serverName/instanceName scenario connecting to a MS SQL database. Going via the ready api GUI, it appears to strip off the slash from the name. I’ve tried shortcutting by inserting the connection string directly into the settings.xml, but no luck.
I’ve also tried added the instance name as a property to the connection string, also no luck.
Crucially - I had to bypass the Database setup UI and author a connection string directly that EXLUDES the port number ( ms sql with intances don’t utilise port numbers as areference point). The ReadyAPI GUI appears to default to 1433 if you leave the port field blank…I inserted a connection string directly into a JDBC Request test step instead of creating a Database reference object.