This is my connection String:
public static void connectToDatabase() {
String url = "jdbc:sqlserver://192.168.0.95\\instance;databaseName=sampleDB";
String username = "sa";
String password = "pass";
try {
Connection conn = DriverManager.getConnection(url,username,password);
System.out.println("Connected to sql server");
}
I have never used MS SQL but i need to connect and this is error that i got:
avg 12, 2020 2:45:47 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
WARNING: TLSv1 was negotiated. Please update server and client to use TLSv1.2 at minimum.
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'sa'.
ClientConnectionId:33111bca-b8c7-4be3-9673-b012c5949817
I'm using windows 7 professional(don't ask). How can i fix this?