I am trying to connect a MS SQL server with jdbc driver. I am getting below error;
Verify the connection properties. Make sure that an instance of SQL Server is
The SQL Server instance MYINSTANCE
is probably not listening on port 1433. Normally, a connection URL will include an instance name or a port number, not both. When both are supplied, one must take precedence.
If specifying both with Port: 1433
for HeidiSQL allows you to connect then it seems that HeidiSQL is giving precedence to the instance name. The SQL Server JDBC driver does the opposite: when presented with both an instance name and a port number it will give precedence to the port number.
So, you should be able to connect using a URL like this:
jdbc:sqlserver://50.50.50.50;instanceName=MYINSTANCE
Check if there is no rule blocking TCP connection on cmd do the
telnet 127.0.0.1 1433
and also check in your SQL server configuration the TCP port is correct or not.