I'm trying to connect to MS SQL Server (running on my machine) from a Java program. I'm getting the following long winded exception:
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
When I check "Properties" and click "View Connection Properties" in the Object Explorer of MS SQL, I find that the "Server is Unavailable." This seems possibly related to the exception message.
How can I make the server available?
Edit:
I am using SQL Server 2008, and I have now enabled TCP/IP, and restarted my instance. I am still told that "Server is unavailable."
Any other ideas?