I am trying to connect to a local database (SQL Server 2008) with Java. I have disabled tcp connections for each client and I cannot connect. I also need to disable the SQL Server Browser service.
I am writing the following statement in Java:
conexion = DriverManager.getConnection("jdbc:sqlserver://localhost\\SQLEXPRESS;user=user;password=password");
and I have the following error:
"java.net.SocketTimeoutException: Receive time." (Then this tells me that there is probably a firewall and that I should start SQL Server Browser).
If I try to connect with Microsoft SQL Server Managment Studio, and I can connect with the same parameters:
Server type: Database Engine Server name: localhost\SQLEXPRESS Authentication: SQL Server Authentication User: user Password: password
I donβt know that I am doing something wrong. I am Java, but SQL Server Managment Studio is actually a client, so if it can connect, any client should do this.
Please reply. If you need more information, just ask about it.
sql shared-memory sql-server jdbc
user589155
source share