im nearly becoming crazy :)
I installed a Microsoft SQL Server 2008 R2 im my network and now im tryin to connect the sql database via JAVA JDBC. Im using the Microsoft JDBC Driver v3 the sqljdbc4.jar ( http://www.microsoft.com/downloads/de-de/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707 )
Java Code:
Connection conn = DriverManager.getConnection("jdbc:sqlserver://192.168.1.144:1433;database=mydatabase;user=root;password=root");
//this line is not even printed so the problem have to be at getConnection
System.out.println("test");
The strange thing is that there is no exception appearing. Its just doing nothing. If I try it with a wrong username there is a exception so the authentication seems to work.
Maybe there is afirewall problem wich blocks the connection from the java client (OS of the server is MS Server 2008R2) ?
Hope some of you guys have an idea what can be the problem or a approach to solve this. Thanks in advance ...
instanceNamefrom the connection stringConnection conn = DriverManager.getConnection("jdbc:sqlserver://192.168.1.144\\WIN-JRVO6I57T5V:1433;;loginTimeout=20;database=Studienprojekt;user=root;password=root");as well asConnection conn = DriverManager.getConnection("jdbc:sqlserver://192.168.1.144:1433;instanceName=WIN-JRVO6I57T5V;loginTimeout=20;database=Studienprojekt;user=root;password=root");In the JDBC Documentation they say that if there is no instance mentioned it will use the default one. I think thats the correct one in my case ...