Cannot connect with SSMS

Discussion in 'Databases' started by MKohnen, Feb 2, 2011.

  1. Yet another "I can't connect."

    I set up a database using Site Manager > MS SQL 2008
    I am using SSMS ver 10.
    In the "Connect to Server" Login tab, I've entered the following:
    Server Type: Database Engine
    Server Name: s04.Winhost.com
    Authentication: SQL Server Authentication
    Login: (The Database User from the MS SQL 2008 > Manage panel)
    Password: (My Database Password, which I made sure of)

    When I click "Connect", if I haven't set the "Connection Time-out" field to 0 in the "Connection Properties" tab, I will get a Time-out error. If I do set it to 0, I get the following error:

    TITLE: Connect to Server
    ------------------------------

    Cannot connect to s04.Winhost.com.

    ------------------------------
    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)

    For help, click: http://go.microsoft.com/fwlink?Prod...rver&EvtSrc=MSSQLServer&EvtID=64&LinkId=20476

    ------------------------------
    I have tried the following:
    - Ping s04.Winhost.com
    I got replys, with an average time of 2349ms. The IP is 96.31.35.239
    - telnet s04.Winhost.com 1433
    Displays "Connected to s04.Winhost.com. Escape character is '^]'."
    I've never used telnet before, but I assume this means I can connect to the SQL server.
    - In the "Connect to Server" Login tab, I've also tried to set the "Server Name" to "tcp:s04.Winhost.com" and "tcp:s04.Winhost.com, 1433"
    - I've set the network protocol to "TCP/IP" in the "Connection Properties" tab
    - I've used SQL Server Configuration Manager to create an alias name server that uses the IP address. I've also enabled TCP/IP in Protocols for SQL Server Network Configuration.

    What else should I be trying?
     
    Last edited by a moderator: Oct 14, 2015
  2. rum

    rum Winhost Staff

    The telnet test shows that the default port 1433 is open and the connection can be established. The error message you are getting is different from the general error message "Instance specific of network related..." when the connection cannot be made to the server. That makes me believe that although the connections is established, something is disrupting it afterward. The first things to blame in this case are local antivirus and firewalls. Try to disable them temporarily and see if it solves the problem.
     
  3. I have disabled antivirus and firewall (Vipre) and I connected directly to the satellite modem. I am getting different error messages, but I think I did connected through the router and with antivirus running, too.

    The message I got this time is:

    TITLE: Connect to Server
    ------------------------------

    Cannot connect to tcp:s04.Winhost.com.

    ------------------------------
    ADDITIONAL INFORMATION:

    A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)

    For help, click: http://go.microsoft.com/fwlink?Prod...rver&EvtSrc=MSSQLServer&EvtID=64&LinkId=20476

    ------------------------------
     
    Last edited by a moderator: Oct 14, 2015
  4. rum

    rum Winhost Staff

    There is definitely something wrong with your local environment. Can you please try connecting from a different computer and if possible different network?
     
  5. The computer that I am trying to connect with is Dell Laptop w/ Vista and wireless. I tried last night with another computer (Dell running XP Pro SP 3 wired) and got exactly the same results. I did get different results on the laptop after I completely uninstalled Vipre. This is the message I got:
    ===================================

    Cannot connect to tcp:s04.Winhost.com,1433.

    ===================================

    A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.) (.Net SqlClient Data Provider)

    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?Prod...ver&EvtSrc=MSSQLServer&EvtID=121&LinkId=20476

    ------------------------------
    Server Name: tcp:s04.Winhost.com,1433
    Error Number: 121
    Severity: 20
    State: 0


    ------------------------------
    Program Location:

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
    at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
    at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
    at System.Data.SqlClient.TdsParserStateObject.ReadByte()
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
    at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

    I don't know how I would try from a different network, though. Do you know if the latency of satellite internet could be a factor? And, although ping and telnet tells me that I can communicate with the server, are they telling me that the server can communicate with me?

    BTW, is there anyone else that you know of that connects through Xplornet satellite?
     
    Last edited by a moderator: Oct 14, 2015
  6. Ray

    Ray

    For now try bypassing your router and/or firewalls and/or antivirus software and connect directly to the internet if you can.

    Also try running this test in your MS DOS command prompt...

    sqlcmd -S [sql server name] -U [your database login] -P [your database password]

    Keep in mind you will have to replace the values I proved in the example and drop the bracket signs "[ ]".

    Also if it is possible tell us what is your database name and I'll also test it on my end.
     
  7. Well, I've tried totally uninstalling the firewall software, and I plugged my satellite modem directly into my computer. No change, still can't connect. Tried with a different computer, no luck. I contacted the folks at Sunbelt, the makers of the Vipre firewall I use, and they ran some tests then assure me that the firewall can't be the thing causing the problem. I have sent an email to Xplornet to find out if there is any way something in their service could be blocking connection. It may be a while before I hear from them, though.

    I tried the sqlcmd you suggested. This is what I entered (from a command prompt running as Administrator):
    sqlcmd -S s04.Winhost.com -U DB_13856_test_user -P testit1 -l 0 (I added the -l 0 because I kept getting timeout errors.)

    This is the message that was displayed:

    HResult 0x1A, Level 16, State 1
    Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server.
    HResult 0x40, Level 16, State 1
    TCP Provider: The specified network name is no longer available.
    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Client unable to establish connection due to prelogin failure.

    Both the password and database are temporary for testing purposes, so don't worry about the password or anything. You did ask for that info, though, so I don't know how else to send it to you. And thanks for all your help.
     
    Last edited by a moderator: Oct 14, 2015
  8. Yahoo, it's finally working, and I'm sorry to say that I just hadn't tried hard enough. The solution was to try port 14330 instead of 1433. I don't know what's blockinig 1433, since I can connect using telnet to the server, and I can ping and get back the IP. I guess the outgoing 1433 is open, but the incoming is not. Is that possible? I really don't know much about ports (obviously need to learn a lot more.) I would say that it has to be something to do with Xplornet, or could it be that I'm using SQL Server Express and a named instance?

    Although I would like to know the answers to the questions I just posed, I thank both Ray and Rum for all the help they bestowed upon my humble self.
     
  9. Ray

    Ray

    No, it wouldn't be SQL Express that caused the problem you are having. Unfortunately, routers can control all the network process on your end, whether it be incoming or outgoing, and if that is the case then it certainly would have been difficult to troubleshoot. I suggest you follow up with "Xplornet" and notify them of what has transpired. They maybe able to access some kind of log and tell you what was happening on the back end.
     
  10. In case anyone with the similar problem I was having is following this thread, I thought I'd add this.

    I got this response from Xplornet support:
    _________________________________________
    Hello Mike,

    Sorry for the delay to your email. I have looked into the issue on this end and I believe I found the issue. Our satellite beams have 2 carriers, (A & B) and your modem is on the B carrier and in order for remote access to work it needs to be on the A carrier. I have gone ahead and corrected this for you. The beams sometimes push people to the wrong carrier but it’s a rare occurrence. I apologize for the inconvenience.

    Xplornet Technical Services
    ___________________________________________
    I have not tried using port 1433 since I got this email, if it doesn't work I'd have to rule out virus scanner and all that and I'm happy sticking with port 14330. I should also note that I could have made my life a lot easier if I'd trusted netstat -a more, since it listed 14330 as available, but did not list 1433 at all.
     

Share This Page