Monday, October 7, 2024

Java Program to Connect SQL Server

 First time I tried to connect SQL Server using Java


'


Faced below issue while trying to connect

This driver is not configured for integrated authentication. We need to download the jdbc libraries and place in this path.

Dowloaded file


Place file in jre path

Uploading: 3649 of 3649 bytes uploaded.



"connection refused: getsockopt. 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.".

This is due to TCP/IP Disabled. Enabled TCP/IP and restarted services.





Add jdbc drivers to connect SQL server. Download latest libraries from SQL server








No comments: