Reputation: 687
I am trying to access and read data from a .mdf
Microsoft SQL Server file (located on a remote server) inside a Java application running locally.
I have a SQL Server JDBC driver installed and it's on my classpath
but I still cannot seem to access the file, I get the following error:
The connection to the host PD-SQLTEST, named instance sqlexpress failed.
Error: "java.net.SocketTimeoutException: Receive timed out"
I am defining the connection URL as follows:
String URLSqlServer ="jdbc:sqlserver://PD-SQLTEST\\SQLEXPRESS; databaseName=AOMLive";
The .mdf
is called AOMLive.mdf
Any ideas what I am doing wrong here? Does the SQL Server Database on the remote server have to be running for me to access?
Upvotes: 1
Views: 1410
Reputation: 51
You must have the SQL Server running; JDBC cannot read that file directly.
Upvotes: 5