Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've installed SQL Server 2008 Express.

I connected to it and created a Database with Microsoft SQL Management Studio.

But I cannot connect (with same url, username and password) to the DB from my java application.

Any ideas?

Thanks in advance.

share|improve this question
    
Also a note, SQL Server Express will not accept connections from remote computers. Even if you enable the TCP/IP Protocol, the connecting address must be from a local IP. –  Chris S Jul 8 '10 at 17:30
    
SQL Server Express, by default, does not allow remote connections. However, it can receive remote connections just fine. –  K. Brian Kelley Jul 8 '10 at 17:49
add comment

2 Answers 2

up vote 2 down vote accepted

This blog post details all the steps you need to go through to ensure you can connect to SQL Server Express remotely. While the post is for Vista, it's applicable to the server operating systems as well. One thing you'll probably want to do to isolate where the issue is with respect to connecting is to use ODBC Data Sources from a remote server and see if you can establish a connection once you've done all the configuration work. If you can, then SQL Server Express is set up properly and it's a matter of getting the Java app configured correctly.

share|improve this answer
add comment

Take a look on your Windows Start Menu, you must have some programs about Microsoft SQL Server, you must enable the "TCP/IP Protocol" in the "SQL Server Configuration Manager"

share|improve this answer
    
done. Now I need to add it to allow-list in windows firewall. But I cannot find sqlserv.exe. What are the exe-file names which I should add to allow-list? –  Roman Jul 8 '10 at 17:05
    
The server .exe should be something like this: "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\Sqlservr.exe" (depending of your architecture, instance name and your version) –  Kedare Jul 8 '10 at 17:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.