title: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed
body: <p>I keep on getting this error. I tried one solution from Stack Overflow (below), which did not work for me:
  <a href="https://stackoverflow.com/questions/10035291/ql-exception-while-connecting-to-sql-server">SQL Exception while connecting to SQL server</a></p>
  <p>I tried allowing port 1433 in the Windows firewall by using a link, that did not work either. Refer to section &quot;To open a port in the Windows firewall for TCP access&quot;
  <a href="http://msdn.microsoft.com/en-us/library/ms175043.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms175043.aspx</a></p>
  <blockquote>
  <p>com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP
  connection to the host localhost, port 1433 has failed. Error:
  &quot;Connection refused: connect. Verify the connection properties.  Make
  sure that an instance of SQL Server is running on the host  and
  accepting TCP/IP connections at the port. Make sure that TCP
  connections to the port are not blocked by a firewall.</p>
  </blockquote>
  <p>Please help me to fix this problem.</p>