I had maded: My operation system is Windows XP Instal SQL Server 2000, JRE 6.0, JDK 6, JDBC 4.0. Servlet's works fine. I create servlet, which connect to server with using JDBC. servlet's cod:
public class database2 extends HttpServlet { public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=Windows-1251"); PrintWriter out = response.getWriter(); String url="jdbc:sqlserver://COMP;user=San4o;password="; out.println("1...<BR>") ; try {
con.close(); } catch (SQLException e2) { out.println("exc2...<BR>"); out.println(e2.toString()); } catch (Exception e3) { out.println(e3.toString()); } } } ... in Server Manager server - COMP start server COMP has login - sa and password - asd123 in Server Network Utility in properties of TCP/IP default port is 1433 When i run my servlet, i get message :
com.microsoft.sqlserver.jdbc.SQLServerException: Не удалось установить соединение TCP/IP к серверу COMP по порту 1433. Ошибка: "Connection refused: connect. Проверьте свойства соединения, убедитесь, что на узле работает экземпляр SQL Server и принимает соединения TCP/IP по нужному порту, а брандмауэр не блокирует TCP-соединения по этому порту.".