none
i open the 1433 port for my sql but now when i telnet 1433,it shows cannot open the connection to loacl computer ,in port 23

Answers

All replies

  • I am moving it to tools.

    Provide details. Thanks.


    Kalman Toth Database & OLAP Architect IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012


    Saturday, November 02, 2013 4:35 PM
  • No you should not need to open port 23.  Can you upload a screenshot of the error?  That message means that Telnet is still trying to use the default port.  Are you trying the command like this?

    telnet ServerNameOrIP 1433

     ________________________________________________________________________

    Please click the Mark as answer button if I answered your question, and vote as helpful if this reply helps you. Thank you!




    Saturday, November 02, 2013 11:44 PM
  • You need to explicitly specify port 1433 on the TELNET command for the SQL port test.  TELNET defaults the standard 23 TELNET port.  Try:

    TELNET YourServerName 1433


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Saturday, November 02, 2013 11:49 PM
  • yes it can work when  i command telnet serverName 1433
    Sunday, November 03, 2013 7:23 AM
  • i tried.it can work
    Sunday, November 03, 2013 7:24 AM
  • here all my codes:

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%@ page import = "java.sql.*" %>

    <html>
      <head>
        <base href="<%=basePath%>">
        <title>Test page for connection</title>
      </head>
      <body bgcolor= "#00ffff">
        <%
            String url = "jdbc:odbc:Temdata";
            String username = "huyaozhong";
            String password = "123456";
            Connection con = null;
            try{
                 out.println("Beforw first connection<br>");
                 con = DriverManager.getConnection(url);
                 out.println("After first connection<br>");
            }catch(SQLException e){        
                out.println("First connection throws exception "+e.getMessage()+e.getCause()+e.getErrorCode()+"<br>");
            }        
            if(con == null){
                 out.println("First connection was failed<br>");
            }else{
            
                out.println("First connection successs<br>");
            }
            try{    
               out.println("Before load Driver class<br>");
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
               out.println("After load Driver class<br>");
            }catch(ClassNotFoundException e){          
               out.println("Exception occure when load Driver Class"+e.getMessage()+e.getCause()+e.getException()+"<br>");   
            }  
            try{
                out.println("Before second conenction<br>");           
                con = DriverManager.getConnection(url);
                out.println("After second connection<br>");
            }catch(SQLException e){        
                 out.println("Exception occure when first connecte to database "+e.getMessage()+e.getCause()+e.getErrorCode()+"<br>");
            }
            if(con == null){
                out.println("seceond connection failed<br>");
            }else{
            
                out.println("seconde connection seccess");
            }
            try{
            
              if(con != null)
                   con.close();
            }catch(SQLException e){
                out.println("Exception occure when the  connection closed"+e.getSQLState()+e.getCause()+"<br>");
            }
         %>   
      </body>
    </html>
    but result shows: [Microsoft][ODBC SQL Server Driver][SQL Server]user  sing in failed     18456

    i checked the username and password ,both are right and i can sing in my database .i don't know why here tell me user cannot sing in?

    Sunday, November 03, 2013 7:29 AM

  • but result shows: [Microsoft][ODBC SQL Server Driver][SQL Server]user  sing in failed     18456

    Hello,

    It seems that you  try to connect to the SQL Server instance with SQL Server authentication. Did you check the server authentication mode in the Server Security properties dialog box? Please verify it is SQL Server and Windows Authentication mode.

    Regards,
    Fanny Liu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

    Monday, November 04, 2013 8:05 AM
  • i made it .thank you
    Monday, November 04, 2013 1:08 PM