title: How can I make MS SQL Server available for connections?
body: <p>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:</p>
  
  <p><code>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.".
  </code></p>
  
  <p>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.</p>
  
  <p>How can I make the server available?</p>
  
  <p>Edit:</p>
  
  <p>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."</p>
  
  <p>Any other ideas?</p>